Spaces:
Running
Running
Reset dropdown of categories and leaderboard after submission
Browse files
app.py
CHANGED
@@ -95,9 +95,10 @@ def submit_results():
|
|
95 |
gr.update(visible=False),
|
96 |
gr.update(visible=False),
|
97 |
gr.update(visible=False),
|
98 |
-
gr.DataFrame(value=leaderboard_server.get_leaderboard(), visible=True),
|
99 |
gr.update(visible=False),
|
100 |
gr.update(choices=leaderboard_server.submission_ids),
|
|
|
101 |
)
|
102 |
|
103 |
|
@@ -140,8 +141,9 @@ def on_application_load():
|
|
140 |
leaderboard_server.save_pre_submit()
|
141 |
leaderboard_server.update_leaderboard()
|
142 |
return (
|
143 |
-
gr.DataFrame(value=leaderboard_server.get_leaderboard(), visible=True),
|
144 |
-
gr.update(choices=leaderboard_server.submission_ids)
|
|
|
145 |
)
|
146 |
|
147 |
|
@@ -219,7 +221,7 @@ with gr.Blocks(theme=gr.themes.Soft(text_size=text_md), css=custom_css) as main:
|
|
219 |
|
220 |
with gr.Row():
|
221 |
results_table = gr.DataFrame(
|
222 |
-
leaderboard_server.get_leaderboard(),
|
223 |
interactive=False,
|
224 |
label=None,
|
225 |
visible=True,
|
@@ -336,6 +338,7 @@ with gr.Blocks(theme=gr.themes.Soft(text_size=text_md), css=custom_css) as main:
|
|
336 |
results_table,
|
337 |
modal_submit,
|
338 |
detail_dropdown,
|
|
|
339 |
],
|
340 |
)
|
341 |
|
@@ -355,6 +358,15 @@ with gr.Blocks(theme=gr.themes.Soft(text_size=text_md), css=custom_css) as main:
|
|
355 |
pre_submit_table,
|
356 |
],
|
357 |
)
|
358 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
359 |
|
360 |
main.launch()
|
|
|
95 |
gr.update(visible=False),
|
96 |
gr.update(visible=False),
|
97 |
gr.update(visible=False),
|
98 |
+
gr.DataFrame(value=leaderboard_server.get_leaderboard(category=leaderboard_server.tasks_category_overall), visible=True),
|
99 |
gr.update(visible=False),
|
100 |
gr.update(choices=leaderboard_server.submission_ids),
|
101 |
+
gr.update(value=leaderboard_server.tasks_category_overall),
|
102 |
)
|
103 |
|
104 |
|
|
|
141 |
leaderboard_server.save_pre_submit()
|
142 |
leaderboard_server.update_leaderboard()
|
143 |
return (
|
144 |
+
gr.DataFrame(value=leaderboard_server.get_leaderboard(category=leaderboard_server.tasks_category_overall), visible=True),
|
145 |
+
gr.update(choices=leaderboard_server.submission_ids),
|
146 |
+
gr.update(value=leaderboard_server.tasks_category_overall),
|
147 |
)
|
148 |
|
149 |
|
|
|
221 |
|
222 |
with gr.Row():
|
223 |
results_table = gr.DataFrame(
|
224 |
+
leaderboard_server.get_leaderboard(category=leaderboard_server.tasks_category_overall),
|
225 |
interactive=False,
|
226 |
label=None,
|
227 |
visible=True,
|
|
|
338 |
results_table,
|
339 |
modal_submit,
|
340 |
detail_dropdown,
|
341 |
+
category_of_tasks,
|
342 |
],
|
343 |
)
|
344 |
|
|
|
358 |
pre_submit_table,
|
359 |
],
|
360 |
)
|
361 |
+
|
362 |
+
main.load(
|
363 |
+
on_application_load,
|
364 |
+
inputs=None,
|
365 |
+
outputs=[
|
366 |
+
results_table,
|
367 |
+
detail_dropdown,
|
368 |
+
category_of_tasks,
|
369 |
+
]
|
370 |
+
)
|
371 |
|
372 |
main.launch()
|