Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
"""A gradio app that renders a static leaderboard. This is used for Hugging Face Space."""
|
2 |
import ast
|
3 |
import argparse
|
|
|
4 |
import pickle
|
5 |
|
6 |
import gradio as gr
|
@@ -277,5 +278,13 @@ if __name__ == "__main__":
|
|
277 |
parser.add_argument("--share", action="store_true")
|
278 |
args = parser.parse_args()
|
279 |
|
280 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
281 |
demo.launch(share=args.share)
|
|
|
1 |
"""A gradio app that renders a static leaderboard. This is used for Hugging Face Space."""
|
2 |
import ast
|
3 |
import argparse
|
4 |
+
import glob
|
5 |
import pickle
|
6 |
|
7 |
import gradio as gr
|
|
|
278 |
parser.add_argument("--share", action="store_true")
|
279 |
args = parser.parse_args()
|
280 |
|
281 |
+
elo_result_files = glob.glob("elo_results_*.pkl")
|
282 |
+
elo_result_files.sort(key=lambda x: int(x[12:-4]))
|
283 |
+
elo_result_file = elo_result_files[-1]
|
284 |
+
|
285 |
+
leaderboard_table_files = glob.glob("leaderboard_table_*.csv")
|
286 |
+
leaderboard_table_files.sort(key=lambda x: int(x[18:-4]))
|
287 |
+
leaderboard_table_file = leaderboard_table_files[-1]
|
288 |
+
|
289 |
+
demo = build_demo(elo_result_file, leaderboard_table_file)
|
290 |
demo.launch(share=args.share)
|