mirror of
https://github.com/LibreTranslate/LibreTranslate.git
synced 2025-05-04 12:24:52 +00:00
Added models include option in docker build
This commit is contained in:
parent
3a65bbce52
commit
e828658332
2 changed files with 13 additions and 5 deletions
|
@ -1,7 +1,11 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import argparse
|
||||
from app.init import check_and_install_models, check_and_install_transliteration
|
||||
|
||||
if __name__ == "__main__":
|
||||
check_and_install_models(force=True)
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument("--load_only_lang_codes", type=str, default="")
|
||||
args = parser.parse_args()
|
||||
lang_codes = args.load_only_lang_codes.split(",") or None
|
||||
check_and_install_models(force=True, load_only_lang_codes=lang_codes)
|
||||
check_and_install_transliteration(force=True)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue