AdithyaSK commited on
Commit
72657ca
β€’
1 Parent(s): c12d258

updated UI - Adithya S K

Browse files
Files changed (1) hide show
  1. app.py +60 -49
app.py CHANGED
@@ -61,67 +61,78 @@ def main():
61
  with Leaderboard_tab:
62
  data = get_data()
63
 
 
64
  table_data = []
65
  all_models = []
66
-
67
- for item in data:
68
- model_name = item.get("name")
69
- language = item.get("language")
70
- try:
71
- ALL = item["result"]["all"]["acc_norm"]
72
- except KeyError:
73
- ALL = None
74
- try:
75
- ARC_Easy = item["result"]["ARC-Easy"]["acc_norm"]
76
- except KeyError:
77
- ARC_Easy = None
78
- try:
79
- ARC_Challenge = item["result"]["ARC-Challenge"]["acc_norm"]
80
- except KeyError:
81
- ARC_Challenge = None
82
- try:
83
- Hellaswag = item["result"]["Hellaswag"]["acc_norm"]
84
- except KeyError:
85
- Hellaswag = None
86
- try:
87
- Boolq = item["result"]["Boolq"]["acc_norm"]
88
- except KeyError:
89
- Boolq = None
90
- try:
91
- MMLU = item["result"]["MMLU"]["acc_norm"]
92
- except KeyError:
93
- MMLU = None
94
- try:
95
- Translation = item["result"]["Translation"]["acc_norm"]
96
- except KeyError:
97
- Translation = None
 
 
98
 
99
- # If you are going through the code and wondering what is happening this code is a mess
100
-
101
- all_models.append(model_name)
102
- table_data.append({
103
- "Model": model_name,
104
- "Language": language,
105
- "Avergae": ALL,
106
- "ARC-Easy": ARC_Easy,
107
- "ARC-Challenge": ARC_Challenge,
108
- "Hellaswag": Hellaswag,
109
- "Boolq": Boolq,
110
- "MMLU": MMLU,
111
- "Translation": Translation,
112
- })
113
-
114
- df = pd.DataFrame(table_data)
 
 
 
 
 
 
115
 
116
  title = st.text_input('Model', placeholder=" πŸ” Search for your model (separate multiple queries with `;`) and press ENTER...")
117
 
118
  on = st.checkbox('Sort by Language')
 
 
119
 
120
  col1, col2 = st.columns(2)
121
  with col1:
122
  benchmark_options = st.multiselect(
123
  'Pick Benchmark',
124
- ['ARC-Easy', 'ARC-Challenge', 'Hellaswag', 'Boolq','MMLU','Translation'],['ARC-Easy', 'ARC-Challenge', 'Hellaswag', 'Boolq','MMLU','Translation'])
125
  with col2:
126
  language_options = st.multiselect(
127
  'Pick Languages',
 
61
  with Leaderboard_tab:
62
  data = get_data()
63
 
64
+
65
  table_data = []
66
  all_models = []
67
+ try:
68
+ for item in data:
69
+ model_name = item.get("name")
70
+ language = item.get("language")
71
+ try:
72
+ ALL = item["result"]["all"]["acc_norm"]
73
+ except KeyError:
74
+ ALL = None
75
+ try:
76
+ ARC_Easy = item["result"]["ARC-Easy"]["acc_norm"]
77
+ except KeyError:
78
+ ARC_Easy = None
79
+ try:
80
+ ARC_Challenge = item["result"]["ARC-Challenge"]["acc_norm"]
81
+ except KeyError:
82
+ ARC_Challenge = None
83
+ try:
84
+ Hellaswag = item["result"]["Hellaswag"]["acc_norm"]
85
+ except KeyError:
86
+ Hellaswag = None
87
+ try:
88
+ Boolq = item["result"]["Boolq"]["acc_norm"]
89
+ except KeyError:
90
+ Boolq = None
91
+ try:
92
+ MMLU = item["result"]["MMLU"]["acc_norm"]
93
+ except KeyError:
94
+ MMLU = None
95
+ try:
96
+ Translation = item["result"]["Translation"]["acc_norm"]
97
+ except KeyError:
98
+ Translation = None
99
+
100
+ # If you are going through the code and wondering what is happening this code is a mess
101
 
102
+ all_models.append(model_name)
103
+ table_data.append({
104
+ "Model": model_name,
105
+ "Language": language,
106
+ "Avergae": ALL,
107
+ "ARC-Easy": ARC_Easy,
108
+ "ARC-Challenge": ARC_Challenge,
109
+ "Hellaswag": Hellaswag,
110
+ "Boolq": Boolq,
111
+ "MMLU": MMLU,
112
+ "Translation": Translation,
113
+ })
114
+
115
+ df = pd.DataFrame(table_data)
116
+ except:
117
+ columns = ["Model", "Language", "Avergae", "ARC-Easy", "ARC-Challenge", "Hellaswag", "Boolq", "MMLU", "Translation"]
118
+ # Create an empty list to hold the data
119
+ table_data = []
120
+ # Append an empty dictionary with column names as keys to the table_data list
121
+ table_data.append({col: None for col in columns})
122
+ # Create a DataFrame from the table_data list
123
+ df = pd.DataFrame(table_data)
124
 
125
  title = st.text_input('Model', placeholder=" πŸ” Search for your model (separate multiple queries with `;`) and press ENTER...")
126
 
127
  on = st.checkbox('Sort by Language')
128
+
129
+ st.text("Boolq , MMLU , Translation is still being tested")
130
 
131
  col1, col2 = st.columns(2)
132
  with col1:
133
  benchmark_options = st.multiselect(
134
  'Pick Benchmark',
135
+ ['ARC-Easy', 'ARC-Challenge', 'Hellaswag', 'Boolq','MMLU','Translation'],['ARC-Easy', 'ARC-Challenge', 'Hellaswag'])
136
  with col2:
137
  language_options = st.multiselect(
138
  'Pick Languages',