elmadany commited on
Commit
3d1f5bb
·
verified ·
1 Parent(s): 80cfd86

Update helper.py

Browse files
Files changed (1) hide show
  1. helper.py +14 -12
helper.py CHANGED
@@ -305,18 +305,6 @@ def df_to_html(df, col_minwidth=90, col_maxwidth=140, model_col_width=400):
305
 
306
 
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
 
321
  def get_lang_table(lang_name):
322
  iso_codes = LANGNAME2ISOS.get(lang_name, [])
@@ -366,3 +354,17 @@ def get_lang_table(lang_name):
366
  table = table.drop(columns=['rank_symbol', '__overall_score_float'])
367
  return table
368
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
305
 
306
 
307
 
 
 
 
 
 
 
 
 
 
 
 
 
308
 
309
  def get_lang_table(lang_name):
310
  iso_codes = LANGNAME2ISOS.get(lang_name, [])
 
354
  table = table.drop(columns=['rank_symbol', '__overall_score_float'])
355
  return table
356
 
357
+
358
+
359
+ cluster_tabs, main_overall_tab, all_df, metric_map = load_leaderboards()
360
+
361
+ LANGNAME2ISOS = build_langname_to_isos(LANG_ISO2NAME)
362
+ #show only African langs
363
+ LANG_NAME_LIST = sorted([lang for lang in LANGNAME2ISOS.keys() if lang not in ['eng', 'fra', 'English', 'French']])
364
+ # TASK_NAME_LIST = sorted(list(TASKS_LIST.values()))
365
+ # Create a list of choices in the format "Task Name (id)"
366
+ TASK_NAME_LIST = sorted([f"{name} ({key})" for key, name in TASKS_LIST.items()])
367
+ TASK_NAME2KEY = {v: k for k, v in TASKS_LIST.items()}
368
+
369
+ # Get the list of unique model names for the new dropdown
370
+ MODEL_NAME_LIST = sorted(all_df['model'].unique()) if not all_df.empty else []