lukecq commited on
Commit
df69eb2
·
1 Parent(s): 1e647ba

update scripts

Browse files
Files changed (1) hide show
  1. app.py +6 -4
app.py CHANGED
@@ -52,10 +52,12 @@ def load_data(data_path):
52
  df_tmp[['en', 'zh', 'id', 'th', 'vi', 'avg', 'avg_sea']] *= 100
53
  df_tmp[['en', 'zh', 'id', 'th', 'vi', 'avg', 'avg_sea']] = df_tmp[['en', 'zh', 'id', 'th', 'vi', 'avg', 'avg_sea']].round(2)
54
 
55
- # change the order of the columns to ['Model', 'type', 'open?', 'shot', 'avg', 'avg_sea', 'en', 'zh', 'id', 'th', 'vi']
56
- df_m3exam = df_m3exam[columns_sorted]
57
- df_mmlu = df_mmlu[columns_sorted]
58
- df_avg = df_avg[columns_sorted]
 
 
59
  return df_m3exam, df_mmlu, df_avg
60
 
61
  # Example path to your CSV file
 
52
  df_tmp[['en', 'zh', 'id', 'th', 'vi', 'avg', 'avg_sea']] *= 100
53
  df_tmp[['en', 'zh', 'id', 'th', 'vi', 'avg', 'avg_sea']] = df_tmp[['en', 'zh', 'id', 'th', 'vi', 'avg', 'avg_sea']].round(2)
54
 
55
+ # change the order of the columns to ['Model', 'type', 'open?', 'shot', 'avg', 'avg_sea', 'en', 'zh', 'id', 'th', 'vi']
56
+ # and sort the columns by 'avg' in descending order
57
+ df_m3exam = df_m3exam[columns_sorted].sort_values(by='avg', ascending=False)
58
+ df_mmlu = df_mmlu[columns_sorted].sort_values(by='avg', ascending=False)
59
+ df_avg = df_avg[columns_sorted].sort_values(by='avg', ascending=False)
60
+
61
  return df_m3exam, df_mmlu, df_avg
62
 
63
  # Example path to your CSV file