Spaces:
Running
Running
Display fix
Browse files- app.py +7 -7
- src/utils.py +1 -2
app.py
CHANGED
|
@@ -722,13 +722,6 @@ with gr.Blocks(theme=theme, css=custom_css, js=js_func) as demo:
|
|
| 722 |
outputs=[comparison_plot_1, comparison_plot_2, col_plot_1, col_model_2, col_plot_2]
|
| 723 |
)
|
| 724 |
|
| 725 |
-
# Initialize all components on load with a single load call (prevents double-rendering in HF Spaces)
|
| 726 |
-
demo.load(
|
| 727 |
-
fn=initialize_all_components,
|
| 728 |
-
inputs=[graph_year_selector],
|
| 729 |
-
outputs=[graph_model_filter, leaderboard, line_plot, model_dropdown_1, model_dropdown_2, comparison_plot_1, comparison_plot_2, col_plot_1, col_model_2, col_plot_2]
|
| 730 |
-
)
|
| 731 |
-
|
| 732 |
gr.Markdown('<hr>')
|
| 733 |
gr.Markdown('<br>')
|
| 734 |
|
|
@@ -759,5 +752,12 @@ with gr.Blocks(theme=theme, css=custom_css, js=js_func) as demo:
|
|
| 759 |
show_copy_button=True,
|
| 760 |
)
|
| 761 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 762 |
if __name__ == "__main__":
|
| 763 |
demo.launch()
|
|
|
|
| 722 |
outputs=[comparison_plot_1, comparison_plot_2, col_plot_1, col_model_2, col_plot_2]
|
| 723 |
)
|
| 724 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 725 |
gr.Markdown('<hr>')
|
| 726 |
gr.Markdown('<br>')
|
| 727 |
|
|
|
|
| 752 |
show_copy_button=True,
|
| 753 |
)
|
| 754 |
|
| 755 |
+
# Initialize all components on load with a single load call (prevents double-rendering in HF Spaces)
|
| 756 |
+
demo.load(
|
| 757 |
+
fn=initialize_all_components,
|
| 758 |
+
inputs=[graph_year_selector],
|
| 759 |
+
outputs=[graph_model_filter, leaderboard, line_plot, model_dropdown_1, model_dropdown_2, comparison_plot_1, comparison_plot_2, col_plot_1, col_model_2, col_plot_2]
|
| 760 |
+
)
|
| 761 |
+
|
| 762 |
if __name__ == "__main__":
|
| 763 |
demo.launch()
|
src/utils.py
CHANGED
|
@@ -230,8 +230,7 @@ def transform_leaderboard_data_to_dataframe(data, years, months, model_metadata=
|
|
| 230 |
"""
|
| 231 |
# Validate measurements and get counts per model
|
| 232 |
is_valid, measurement_counts, message = validate_equal_measurements(data)
|
| 233 |
-
|
| 234 |
-
print(message)
|
| 235 |
|
| 236 |
rows = []
|
| 237 |
|
|
|
|
| 230 |
"""
|
| 231 |
# Validate measurements and get counts per model
|
| 232 |
is_valid, measurement_counts, message = validate_equal_measurements(data)
|
| 233 |
+
# print(message)
|
|
|
|
| 234 |
|
| 235 |
rows = []
|
| 236 |
|