updated UI - Adithya S K
Browse files
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 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
|
|
|
|
|
|
| 98 |
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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'
|
| 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',
|