mirror of
https://github.com/LibreTranslate/LibreTranslate.git
synced 2024-11-25 17:31:00 +00:00
reload installed language models after updating them
This commit is contained in:
parent
dd128162ef
commit
7967c1b2c4
1 changed files with 3 additions and 0 deletions
|
@ -25,6 +25,9 @@ def check_and_install_models(force=False):
|
|||
download_path = available_package.download()
|
||||
package.install_from_path(download_path)
|
||||
|
||||
# reload installed languages
|
||||
global languages
|
||||
languages = translate.load_installed_languages()
|
||||
print("Loaded support for %s languages (%s models total)!" % (len(translate.load_installed_languages()), len(available_packages)))
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue