Spaces:
Runtime error
Runtime error
Fix language resolution
Browse files
app.py
CHANGED
@@ -49,7 +49,7 @@ model_dict = {model_name: gr.Interface.load(f'models/{model_name}') for model_na
|
|
49 |
SUPPORTED_LANG_MODEL_DICT = {}
|
50 |
for lang in SUPPORTED_LANGUAGES:
|
51 |
for model_id in SUPPORTED_MODEL_NAMES:
|
52 |
-
if lang in model_id:
|
53 |
# create new lang in dict
|
54 |
if lang not in SUPPORTED_LANG_MODEL_DICT:
|
55 |
SUPPORTED_LANG_MODEL_DICT[lang] = [model_id]
|
|
|
49 |
SUPPORTED_LANG_MODEL_DICT = {}
|
50 |
for lang in SUPPORTED_LANGUAGES:
|
51 |
for model_id in SUPPORTED_MODEL_NAMES:
|
52 |
+
if ("_" + lang + "_") in model_id:
|
53 |
# create new lang in dict
|
54 |
if lang not in SUPPORTED_LANG_MODEL_DICT:
|
55 |
SUPPORTED_LANG_MODEL_DICT[lang] = [model_id]
|