LibreTranslate/install_models.py
P.J. Finlay ee638b407d Remove Polyglot transliteration library
The model server for the Polyglot transliteration library is currently
down and the project looks unmaintained; this currently is breaking
LibreTranslate installs. This commit removes Polyglot for
transliteration but keeps using Polyglot for language detection.

- https://github.com/LibreTranslate/LibreTranslate/issues/344
- https://community.libretranslate.com/t/improving-transliteration-in-libretranslate/400
2022-11-16 08:59:11 -06:00

12 lines
460 B
Python
Executable file

#!/usr/bin/env python
import argparse
from app.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)