mirror of
https://github.com/LibreTranslate/LibreTranslate.git
synced 2025-05-04 20:30:39 +00:00
UI mostly working
This commit is contained in:
parent
1062ef2713
commit
e9609ddd64
6 changed files with 300 additions and 122 deletions
|
@ -1,10 +1,13 @@
|
|||
import os
|
||||
from argostranslate import translate
|
||||
import os, glob, shutil, zipfile
|
||||
from pathlib import Path
|
||||
from argostranslate import settings
|
||||
|
||||
INSTALLED_MODELS_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "installed_models"))
|
||||
|
||||
os.environ["ARGOS_TRANSLATE_PACKAGES_DIR"] = INSTALLED_MODELS_DIR
|
||||
settings.package_dirs = [Path(INSTALLED_MODELS_DIR)]
|
||||
|
||||
from argostranslate import translate
|
||||
import os, glob, shutil, zipfile
|
||||
|
||||
def boot():
|
||||
check_and_install_models()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue