mirror of
https://github.com/LibreTranslate/LibreTranslate.git
synced 2025-06-26 02:51:05 +00:00
mover scripts in a scripts dir
This commit is contained in:
parent
9b20a735c6
commit
6e04c88308
6 changed files with 3 additions and 3 deletions
12
scripts/install_models.py
Executable file
12
scripts/install_models.py
Executable file
|
@ -0,0 +1,12 @@
|
|||
#!/usr/bin/env python
|
||||
import argparse
|
||||
from libretranslate.init import check_and_install_models
|
||||
|
||||
if __name__ == "__main__":
|
||||
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(",")
|
||||
if len(lang_codes) == 0 or lang_codes[0] == '':
|
||||
lang_codes = None
|
||||
check_and_install_models(force=True, load_only_lang_codes=lang_codes)
|
Loading…
Add table
Add a link
Reference in a new issue