Spaces:
Sleeping
Sleeping
Heatmap: Inserting a heatmap into an app
Browse files
app.py
CHANGED
@@ -208,6 +208,10 @@ def submit_results(*inputs):
|
|
208 |
value=leaderboard_server.get_leaderboard_scatter_plot(category=leaderboard_server.TASKS_CATEGORY_OVERALL),
|
209 |
visible=True,
|
210 |
)
|
|
|
|
|
|
|
|
|
211 |
submission_ids_and_titles = get_submission_ids_and_titles()
|
212 |
|
213 |
return (
|
@@ -223,6 +227,7 @@ def submit_results(*inputs):
|
|
223 |
leaderboard,
|
224 |
leaderboard_csv,
|
225 |
leaderboard_scatter_plot,
|
|
|
226 |
gr.update(visible=False),
|
227 |
gr.update(choices=submission_ids_and_titles),
|
228 |
gr.update(value=leaderboard_server.TASKS_CATEGORY_OVERALL),
|
@@ -344,12 +349,17 @@ def change_leaderboard_category(category, use_corrected_p_value, selected_submis
|
|
344 |
value=leaderboard_server.get_leaderboard_scatter_plot(category=category, kind_of_p_value=kind_of_p_value),
|
345 |
visible=True,
|
346 |
)
|
|
|
|
|
|
|
|
|
347 |
|
348 |
return (
|
349 |
leaderboard,
|
350 |
leaderboard_csv,
|
351 |
task_abbreviation_legend,
|
352 |
leaderboard_scatter_plot,
|
|
|
353 |
tournament_results_title,
|
354 |
tournament_results_dropdown,
|
355 |
model_tournament_results_table,
|
@@ -459,12 +469,17 @@ def on_application_load():
|
|
459 |
value=leaderboard_server.get_leaderboard_scatter_plot(category=leaderboard_server.TASKS_CATEGORY_OVERALL),
|
460 |
visible=True,
|
461 |
)
|
|
|
|
|
|
|
|
|
462 |
submission_ids_and_titles = get_submission_ids_and_titles()
|
463 |
|
464 |
return (
|
465 |
leaderboard,
|
466 |
leaderboard_csv,
|
467 |
leaderboard_scatter_plot,
|
|
|
468 |
gr.update(choices=submission_ids_and_titles),
|
469 |
gr.update(value=leaderboard_server.TASKS_CATEGORY_OVERALL),
|
470 |
gr.update(choices=submission_ids_and_titles),
|
@@ -717,6 +732,12 @@ def gradio_app():
|
|
717 |
label='Scatter plot',
|
718 |
)
|
719 |
|
|
|
|
|
|
|
|
|
|
|
|
|
720 |
gr.Markdown(LEADERBOARD_TAB_BELLOW_PLOT_MARKDOWN)
|
721 |
|
722 |
with gr.Row():
|
@@ -766,6 +787,7 @@ def gradio_app():
|
|
766 |
leaderboard_table_csv,
|
767 |
leaderboard_table_legend,
|
768 |
leaderboard_scatter_plot,
|
|
|
769 |
tournament_results_title,
|
770 |
tournament_results_dropdown,
|
771 |
model_tournament_results_table,
|
@@ -1044,6 +1066,7 @@ def gradio_app():
|
|
1044 |
leaderboard_table,
|
1045 |
leaderboard_table_csv,
|
1046 |
leaderboard_scatter_plot,
|
|
|
1047 |
modal_submit,
|
1048 |
model_details_model_dropdown,
|
1049 |
leaderboard_category_of_tasks,
|
@@ -1113,6 +1136,7 @@ def gradio_app():
|
|
1113 |
leaderboard_table,
|
1114 |
leaderboard_table_csv,
|
1115 |
leaderboard_scatter_plot,
|
|
|
1116 |
model_details_model_dropdown,
|
1117 |
leaderboard_category_of_tasks,
|
1118 |
tournament_results_dropdown,
|
|
|
208 |
value=leaderboard_server.get_leaderboard_scatter_plot(category=leaderboard_server.TASKS_CATEGORY_OVERALL),
|
209 |
visible=True,
|
210 |
)
|
211 |
+
leaderboard_heatmap = gr.update(
|
212 |
+
value=leaderboard_server.get_leaderboard_heatmap(category=leaderboard_server.TASKS_CATEGORY_OVERALL),
|
213 |
+
visible=True,
|
214 |
+
)
|
215 |
submission_ids_and_titles = get_submission_ids_and_titles()
|
216 |
|
217 |
return (
|
|
|
227 |
leaderboard,
|
228 |
leaderboard_csv,
|
229 |
leaderboard_scatter_plot,
|
230 |
+
leaderboard_heatmap,
|
231 |
gr.update(visible=False),
|
232 |
gr.update(choices=submission_ids_and_titles),
|
233 |
gr.update(value=leaderboard_server.TASKS_CATEGORY_OVERALL),
|
|
|
349 |
value=leaderboard_server.get_leaderboard_scatter_plot(category=category, kind_of_p_value=kind_of_p_value),
|
350 |
visible=True,
|
351 |
)
|
352 |
+
leaderboard_heatmap = gr.update(
|
353 |
+
value=leaderboard_server.get_leaderboard_heatmap(category=category, kind_of_p_value=kind_of_p_value),
|
354 |
+
visible=True,
|
355 |
+
)
|
356 |
|
357 |
return (
|
358 |
leaderboard,
|
359 |
leaderboard_csv,
|
360 |
task_abbreviation_legend,
|
361 |
leaderboard_scatter_plot,
|
362 |
+
leaderboard_heatmap,
|
363 |
tournament_results_title,
|
364 |
tournament_results_dropdown,
|
365 |
model_tournament_results_table,
|
|
|
469 |
value=leaderboard_server.get_leaderboard_scatter_plot(category=leaderboard_server.TASKS_CATEGORY_OVERALL),
|
470 |
visible=True,
|
471 |
)
|
472 |
+
leaderboard_heatmap = gr.update(
|
473 |
+
value=leaderboard_server.get_leaderboard_heatmap(category=leaderboard_server.TASKS_CATEGORY_OVERALL),
|
474 |
+
visible=True,
|
475 |
+
)
|
476 |
submission_ids_and_titles = get_submission_ids_and_titles()
|
477 |
|
478 |
return (
|
479 |
leaderboard,
|
480 |
leaderboard_csv,
|
481 |
leaderboard_scatter_plot,
|
482 |
+
leaderboard_heatmap,
|
483 |
gr.update(choices=submission_ids_and_titles),
|
484 |
gr.update(value=leaderboard_server.TASKS_CATEGORY_OVERALL),
|
485 |
gr.update(choices=submission_ids_and_titles),
|
|
|
732 |
label='Scatter plot',
|
733 |
)
|
734 |
|
735 |
+
with gr.Row():
|
736 |
+
leaderboard_heatmap = gr.Plot(
|
737 |
+
value=leaderboard_server.get_leaderboard_heatmap(category=leaderboard_server.TASKS_CATEGORY_OVERALL),
|
738 |
+
label='Heatmap',
|
739 |
+
)
|
740 |
+
|
741 |
gr.Markdown(LEADERBOARD_TAB_BELLOW_PLOT_MARKDOWN)
|
742 |
|
743 |
with gr.Row():
|
|
|
787 |
leaderboard_table_csv,
|
788 |
leaderboard_table_legend,
|
789 |
leaderboard_scatter_plot,
|
790 |
+
leaderboard_heatmap,
|
791 |
tournament_results_title,
|
792 |
tournament_results_dropdown,
|
793 |
model_tournament_results_table,
|
|
|
1066 |
leaderboard_table,
|
1067 |
leaderboard_table_csv,
|
1068 |
leaderboard_scatter_plot,
|
1069 |
+
leaderboard_heatmap,
|
1070 |
modal_submit,
|
1071 |
model_details_model_dropdown,
|
1072 |
leaderboard_category_of_tasks,
|
|
|
1136 |
leaderboard_table,
|
1137 |
leaderboard_table_csv,
|
1138 |
leaderboard_scatter_plot,
|
1139 |
+
leaderboard_heatmap,
|
1140 |
model_details_model_dropdown,
|
1141 |
leaderboard_category_of_tasks,
|
1142 |
tournament_results_dropdown,
|