mirror of
https://github.com/LibreTranslate/LibreTranslate.git
synced 2024-11-18 21:40:11 +01:00
reload installed language models after updating them
This commit is contained in:
parent
dd128162ef
commit
7967c1b2c4
@ -25,6 +25,9 @@ def check_and_install_models(force=False):
|
|||||||
download_path = available_package.download()
|
download_path = available_package.download()
|
||||||
package.install_from_path(download_path)
|
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)))
|
print("Loaded support for %s languages (%s models total)!" % (len(translate.load_installed_languages()), len(available_packages)))
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user