reload installed language models after updating them

This commit is contained in:
mammo0 2021-03-11 14:38:55 +01:00
parent dd128162ef
commit 7967c1b2c4

View file

@ -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)))