smajumdar commited on
Commit
89e9618
1 Parent(s): c21743b

Fix language resolution

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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]