Named volume for db, --update-models arg

This commit is contained in:
Piero Toffanin 2022-12-20 11:13:56 -05:00
parent 5285697203
commit 959f4638cc
6 changed files with 20 additions and 18 deletions

View file

@ -5,9 +5,9 @@ from argostranslate import package, translate
import app.language
def boot(load_only=None):
def boot(load_only=None, update_models=False):
try:
check_and_install_models(load_only_lang_codes=load_only)
check_and_install_models(force=update_models, load_only_lang_codes=load_only)
except Exception as e:
print("Cannot update models (normal if you're offline): %s" % str(e))