1
0
mirror of https://github.com/LibreTranslate/LibreTranslate.git synced 2024-12-18 08:27:03 +02:00

Fix install_models.py

This commit is contained in:
Piero Toffanin 2022-04-01 10:01:15 -04:00 committed by GitHub
parent 39c6cd6e8a
commit 8cc03572e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,6 +6,8 @@ if __name__ == "__main__":
parser = argparse.ArgumentParser() parser = argparse.ArgumentParser()
parser.add_argument("--load_only_lang_codes", type=str, default="") parser.add_argument("--load_only_lang_codes", type=str, default="")
args = parser.parse_args() args = parser.parse_args()
lang_codes = args.load_only_lang_codes.split(",") or None lang_codes = args.load_only_lang_codes.split(",")
if len(lang_codes) == 0:
lang_codes = None
check_and_install_models(force=True, load_only_lang_codes=lang_codes) check_and_install_models(force=True, load_only_lang_codes=lang_codes)
check_and_install_transliteration(force=True) check_and_install_transliteration(force=True)