From 7967c1b2c48fd2ddb31cf8aef6366cd66e43310e Mon Sep 17 00:00:00 2001 From: mammo0 Date: Thu, 11 Mar 2021 14:38:55 +0100 Subject: [PATCH] reload installed language models after updating them --- app/init.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/init.py b/app/init.py index 8b4ef65..21507c6 100644 --- a/app/init.py +++ b/app/init.py @@ -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)))