Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
076ecc1
1
Parent(s):
f8075da
make global leaderboard data refresh on tab switch and vote submission
Browse files
app.py
CHANGED
@@ -435,6 +435,10 @@ The Elo rating system provides a more accurate ranking than simple win rates:
|
|
435 |
fn=handle_new_example_click,
|
436 |
inputs=[],
|
437 |
outputs=[current_example]
|
|
|
|
|
|
|
|
|
438 |
).then(
|
439 |
fn=update_ui_for_new_context,
|
440 |
inputs=[current_example],
|
@@ -482,6 +486,10 @@ The Elo rating system provides a more accurate ranking than simple win rates:
|
|
482 |
inputs=[],
|
483 |
outputs=[results_table_display],
|
484 |
api_name="refresh_leaderboard"
|
|
|
|
|
|
|
|
|
485 |
)
|
486 |
|
487 |
demo.unload(cleanup_on_disconnect)
|
|
|
435 |
fn=handle_new_example_click,
|
436 |
inputs=[],
|
437 |
outputs=[current_example]
|
438 |
+
).then(
|
439 |
+
fn=load_leaderboard_data, # Add this to refresh results_agg
|
440 |
+
inputs=[],
|
441 |
+
outputs=[results_agg]
|
442 |
).then(
|
443 |
fn=update_ui_for_new_context,
|
444 |
inputs=[current_example],
|
|
|
486 |
inputs=[],
|
487 |
outputs=[results_table_display],
|
488 |
api_name="refresh_leaderboard"
|
489 |
+
).then(
|
490 |
+
fn=load_leaderboard_data,
|
491 |
+
inputs=[],
|
492 |
+
outputs=[results_agg]
|
493 |
)
|
494 |
|
495 |
demo.unload(cleanup_on_disconnect)
|