Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Clémentine
commited on
Commit
•
0c95215
1
Parent(s):
58860b6
updated display
Browse files- app.py +8 -2
- requirements.txt +1 -1
app.py
CHANGED
@@ -41,6 +41,12 @@ def get_dataframe_from_results(eval_results, split):
|
|
41 |
for i in [1, 2, 3]:
|
42 |
local_df = local_df.rename_column(f"score_level{i}", f"Level {i} score (%)")
|
43 |
df = pd.DataFrame(local_df)
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
return df
|
45 |
|
46 |
eval_dataframe_val = get_dataframe_from_results(eval_results=eval_results, split="validation")
|
@@ -172,7 +178,7 @@ with demo:
|
|
172 |
value=CITATION_BUTTON_TEXT,
|
173 |
label=CITATION_BUTTON_LABEL,
|
174 |
elem_id="citation-button",
|
175 |
-
)
|
176 |
|
177 |
with gr.Tab("Results: Validation"):
|
178 |
leaderboard_table_val = gr.components.Dataframe(
|
@@ -226,4 +232,4 @@ with demo:
|
|
226 |
scheduler = BackgroundScheduler()
|
227 |
scheduler.add_job(restart_space, "interval", seconds=3600)
|
228 |
scheduler.start()
|
229 |
-
demo.launch()
|
|
|
41 |
for i in [1, 2, 3]:
|
42 |
local_df = local_df.rename_column(f"score_level{i}", f"Level {i} score (%)")
|
43 |
df = pd.DataFrame(local_df)
|
44 |
+
df = df.sort_values(by=["Average score (%)"], ascending=False)
|
45 |
+
|
46 |
+
numeric_cols = [c for c in local_df.column_names if "score" in c]
|
47 |
+
df[numeric_cols] = df[numeric_cols].multiply(100).round(decimals=2)
|
48 |
+
#df = df.style.format("{:.2%}", subset=numeric_cols)
|
49 |
+
|
50 |
return df
|
51 |
|
52 |
eval_dataframe_val = get_dataframe_from_results(eval_results=eval_results, split="validation")
|
|
|
178 |
value=CITATION_BUTTON_TEXT,
|
179 |
label=CITATION_BUTTON_LABEL,
|
180 |
elem_id="citation-button",
|
181 |
+
) #.style(show_copy_button=True)
|
182 |
|
183 |
with gr.Tab("Results: Validation"):
|
184 |
leaderboard_table_val = gr.components.Dataframe(
|
|
|
232 |
scheduler = BackgroundScheduler()
|
233 |
scheduler.add_job(restart_space, "interval", seconds=3600)
|
234 |
scheduler.start()
|
235 |
+
demo.launch(debug=True)
|
requirements.txt
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
datasets==2.14.5
|
2 |
-
gradio==
|
3 |
huggingface-hub==0.18.0
|
4 |
numpy==1.24.2
|
5 |
APScheduler==3.10.1
|
|
|
1 |
datasets==2.14.5
|
2 |
+
gradio==4.1.1
|
3 |
huggingface-hub==0.18.0
|
4 |
numpy==1.24.2
|
5 |
APScheduler==3.10.1
|