Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -347,7 +347,7 @@ acknowledgment_md = """
|
|
347 |
### Acknowledgment
|
348 |
"""
|
349 |
|
350 |
-
def build_demo(
|
351 |
text_size = gr.themes.sizes.text_lg
|
352 |
|
353 |
with gr.Blocks(
|
@@ -356,7 +356,7 @@ def build_demo(elo_results_file, leaderboard_table_file):
|
|
356 |
css=block_css,
|
357 |
) as demo:
|
358 |
leader_components = build_leaderboard_tab(
|
359 |
-
|
360 |
)
|
361 |
return demo
|
362 |
|
@@ -366,13 +366,15 @@ if __name__ == "__main__":
|
|
366 |
parser.add_argument("--share", action="store_true")
|
367 |
args = parser.parse_args()
|
368 |
|
369 |
-
|
370 |
-
|
371 |
-
|
|
|
|
|
372 |
|
373 |
leaderboard_table_files = glob.glob("leaderboard_table_*.csv")
|
374 |
leaderboard_table_files.sort(key=lambda x: int(x[18:-4]))
|
375 |
leaderboard_table_file = leaderboard_table_files[-1]
|
376 |
|
377 |
-
demo = build_demo(
|
378 |
demo.launch(share=args.share)
|
|
|
347 |
### Acknowledgment
|
348 |
"""
|
349 |
|
350 |
+
def build_demo(results_file, leaderboard_table_file):
|
351 |
text_size = gr.themes.sizes.text_lg
|
352 |
|
353 |
with gr.Blocks(
|
|
|
356 |
css=block_css,
|
357 |
) as demo:
|
358 |
leader_components = build_leaderboard_tab(
|
359 |
+
results_file, leaderboard_table_file, show_plot=True
|
360 |
)
|
361 |
return demo
|
362 |
|
|
|
366 |
parser.add_argument("--share", action="store_true")
|
367 |
args = parser.parse_args()
|
368 |
|
369 |
+
# result_files = glob.glob("results_*.pkl")
|
370 |
+
# result_files.sort(key=lambda x: int(x[12:-4]))
|
371 |
+
# result_file = result_files[-1]
|
372 |
+
result_file = None
|
373 |
+
|
374 |
|
375 |
leaderboard_table_files = glob.glob("leaderboard_table_*.csv")
|
376 |
leaderboard_table_files.sort(key=lambda x: int(x[18:-4]))
|
377 |
leaderboard_table_file = leaderboard_table_files[-1]
|
378 |
|
379 |
+
demo = build_demo(result_file, leaderboard_table_file)
|
380 |
demo.launch(share=args.share)
|