Spaces:
Sleeping
Sleeping
style theme
Browse files
app.py
CHANGED
|
@@ -275,7 +275,8 @@ def init_leaderboard(dataframe, visible_columns=None):
|
|
| 275 |
for col in numeric_cols:
|
| 276 |
# Avoid rounding integer columns like counts
|
| 277 |
if not pd.api.types.is_integer_dtype(display_df[col]):
|
| 278 |
-
|
|
|
|
| 279 |
|
| 280 |
return gr.Dataframe(
|
| 281 |
value=display_df,
|
|
@@ -861,26 +862,26 @@ with demo:
|
|
| 861 |
outputs=[leaderboard] + [category_tabs.children[i].children[0] for i in range(1, len(CATEGORIES) + 1)]
|
| 862 |
)
|
| 863 |
|
| 864 |
-
with gr.Row():
|
| 865 |
-
|
| 866 |
-
|
| 867 |
-
|
| 868 |
-
|
| 869 |
-
|
| 870 |
-
|
| 871 |
-
|
| 872 |
-
|
| 873 |
-
|
| 874 |
-
|
| 875 |
-
|
| 876 |
-
|
| 877 |
-
|
| 878 |
-
|
| 879 |
-
|
| 880 |
-
|
| 881 |
-
|
| 882 |
-
|
| 883 |
-
|
| 884 |
|
| 885 |
# Set up the scheduler to refresh data periodically
|
| 886 |
scheduler = BackgroundScheduler()
|
|
|
|
| 275 |
for col in numeric_cols:
|
| 276 |
# Avoid rounding integer columns like counts
|
| 277 |
if not pd.api.types.is_integer_dtype(display_df[col]):
|
| 278 |
+
# Format floats to exactly 3 decimal places, preserving trailing zeros
|
| 279 |
+
display_df[col] = display_df[col].apply(lambda x: f"{x:.3f}" if pd.notna(x) else None)
|
| 280 |
|
| 281 |
return gr.Dataframe(
|
| 282 |
value=display_df,
|
|
|
|
| 862 |
outputs=[leaderboard] + [category_tabs.children[i].children[0] for i in range(1, len(CATEGORIES) + 1)]
|
| 863 |
)
|
| 864 |
|
| 865 |
+
# with gr.Row():
|
| 866 |
+
# with gr.Column():
|
| 867 |
+
# gr.Textbox(
|
| 868 |
+
# value=CITATION_BUTTON_TEXT,
|
| 869 |
+
# label="Cite",
|
| 870 |
+
# lines=8,
|
| 871 |
+
# elem_id="citation-button",
|
| 872 |
+
# show_copy_button=True,
|
| 873 |
+
# )
|
| 874 |
+
|
| 875 |
+
# # with gr.Accordion("Dataset Information", open=False):
|
| 876 |
+
# with gr.Column():
|
| 877 |
+
# gr.Textbox(
|
| 878 |
+
# value=f"""
|
| 879 |
+
# https://huggingface.co/datasets/{RESULTS_DATASET_ID}
|
| 880 |
+
|
| 881 |
+
# Last updated: {pd.Timestamp.now().strftime("%Y-%m-%d %H:%M:%S UTC")}
|
| 882 |
+
# """,
|
| 883 |
+
# lines=8,
|
| 884 |
+
# label="Results:")
|
| 885 |
|
| 886 |
# Set up the scheduler to refresh data periodically
|
| 887 |
scheduler = BackgroundScheduler()
|