Spaces:
Running
Running
Update helper.py
Browse files
helper.py
CHANGED
@@ -122,13 +122,6 @@ def build_langname_to_isos(iso2name):
|
|
122 |
name2isos[name].add(iso)
|
123 |
return name2isos
|
124 |
|
125 |
-
LANGNAME2ISOS = build_langname_to_isos(LANG_ISO2NAME)
|
126 |
-
#show only African langs
|
127 |
-
LANG_NAME_LIST = sorted([lang for lang in LANGNAME2ISOS.keys() if lang not in ['eng', 'fra', 'English', 'French']])
|
128 |
-
# TASK_NAME_LIST = sorted(list(TASKS_LIST.values()))
|
129 |
-
# Create a list of choices in the format "Task Name (id)"
|
130 |
-
TASK_NAME_LIST = sorted([f"{name} ({key})" for key, name in TASKS_LIST.items()])
|
131 |
-
TASK_NAME2KEY = {v: k for k, v in TASKS_LIST.items()}
|
132 |
|
133 |
def get_model_table(model_name):
|
134 |
"""
|
@@ -314,6 +307,14 @@ def df_to_html(df, col_minwidth=90, col_maxwidth=140, model_col_width=400):
|
|
314 |
|
315 |
cluster_tabs, main_overall_tab, all_df, metric_map = load_leaderboards()
|
316 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
317 |
# Get the list of unique model names for the new dropdown
|
318 |
MODEL_NAME_LIST = sorted(all_df['model'].unique()) if not all_df.empty else []
|
319 |
|
@@ -364,5 +365,4 @@ def get_lang_table(lang_name):
|
|
364 |
table['model'] = table['rank_symbol'] + ' ' + table['model']
|
365 |
table = table.drop(columns=['rank_symbol', '__overall_score_float'])
|
366 |
return table
|
367 |
-
|
368 |
|
|
|
122 |
name2isos[name].add(iso)
|
123 |
return name2isos
|
124 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
125 |
|
126 |
def get_model_table(model_name):
|
127 |
"""
|
|
|
307 |
|
308 |
cluster_tabs, main_overall_tab, all_df, metric_map = load_leaderboards()
|
309 |
|
310 |
+
LANGNAME2ISOS = build_langname_to_isos(LANG_ISO2NAME)
|
311 |
+
#show only African langs
|
312 |
+
LANG_NAME_LIST = sorted([lang for lang in LANGNAME2ISOS.keys() if lang not in ['eng', 'fra', 'English', 'French']])
|
313 |
+
# TASK_NAME_LIST = sorted(list(TASKS_LIST.values()))
|
314 |
+
# Create a list of choices in the format "Task Name (id)"
|
315 |
+
TASK_NAME_LIST = sorted([f"{name} ({key})" for key, name in TASKS_LIST.items()])
|
316 |
+
TASK_NAME2KEY = {v: k for k, v in TASKS_LIST.items()}
|
317 |
+
|
318 |
# Get the list of unique model names for the new dropdown
|
319 |
MODEL_NAME_LIST = sorted(all_df['model'].unique()) if not all_df.empty else []
|
320 |
|
|
|
365 |
table['model'] = table['rank_symbol'] + ' ' + table['model']
|
366 |
table = table.drop(columns=['rank_symbol', '__overall_score_float'])
|
367 |
return table
|
|
|
368 |
|