mirror of
https://github.com/LibreTranslate/LibreTranslate.git
synced 2025-05-04 20:30:39 +00:00
Remove --offline flag
This commit is contained in:
parent
c7cc9efee7
commit
800774f557
6 changed files with 18 additions and 19 deletions
|
@ -6,8 +6,11 @@ import app.language
|
|||
import polyglot
|
||||
|
||||
def boot(load_only=None):
|
||||
check_and_install_models(load_only_lang_codes=load_only)
|
||||
check_and_install_transliteration()
|
||||
try:
|
||||
check_and_install_models(load_only_lang_codes=load_only)
|
||||
check_and_install_transliteration()
|
||||
except Exception as e:
|
||||
print("Cannot update models (normal if you're offline): %s" % str(e))
|
||||
|
||||
def check_and_install_models(force=False, load_only_lang_codes=None):
|
||||
if len(package.get_installed_packages()) < 2 or force:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue