Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -10,13 +10,15 @@ def load_table():
|
|
10 |
|
11 |
wide = (
|
12 |
df_long
|
13 |
-
.query("metric != 'alias'")
|
14 |
.pivot_table(index=["model_id", "task"],
|
15 |
-
columns="metric",
|
16 |
values="value")
|
17 |
.reset_index()
|
18 |
.sort_values(["task", "model_id"])
|
19 |
)
|
|
|
|
|
20 |
return wide
|
21 |
|
22 |
def refresh():
|
|
|
10 |
|
11 |
wide = (
|
12 |
df_long
|
13 |
+
.query("metric != 'alias'") # drop alias
|
14 |
.pivot_table(index=["model_id", "task"],
|
15 |
+
columns=["metric", "aggregation"],
|
16 |
values="value")
|
17 |
.reset_index()
|
18 |
.sort_values(["task", "model_id"])
|
19 |
)
|
20 |
+
|
21 |
+
wide.columns = ['_'.join(filter(None, map(str, col))).strip() for col in wide.columns.values]
|
22 |
return wide
|
23 |
|
24 |
def refresh():
|