Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Update app.py
Browse files
app.py
CHANGED
@@ -204,15 +204,6 @@ def update(model_id_white, model_id_black):
|
|
204 |
white_bar = tqdm(total=time_budget_white, desc=f"{model_id_white.split('/')[-1]}:", bar_format=white_bar_format, colour='white')
|
205 |
black_bar = tqdm(total=time_budget_black, desc=f"{model_id_black.split('/')[-1]}:", bar_format=black_bar_format, colour='black')
|
206 |
|
207 |
-
# Download results
|
208 |
-
url1 = (
|
209 |
-
f"https://gist.githubusercontent.com/chessllm/{RESULT_GIST_ID}/raw"
|
210 |
-
)
|
211 |
-
download_file(url1, "chessllm_results.csv")
|
212 |
-
|
213 |
-
# Load ELO ratings for each model
|
214 |
-
url2 = f"https://gist.githubusercontent.com/chessllm/{LEAD_GIST_ID}/raw"
|
215 |
-
download_file(url2, "chessllm_leaderboard.csv")
|
216 |
elo_ratings_df = pd.read_csv("chessllm_leaderboard.csv")
|
217 |
|
218 |
# Game loop
|
@@ -370,6 +361,13 @@ GITHUB_TOKEN = os.environ["GITHUB_TOKEN"]
|
|
370 |
RESULT_GIST_ID = "c491299e7b8a45a61ce5403a70cf8656"
|
371 |
LEAD_GIST_ID = "696115fe2df47fb2350fcff2663678c9"
|
372 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
373 |
title = """
|
374 |
<div align="center">
|
375 |
<h1>⚔️ Chess LLM Arena</h1>
|
@@ -387,5 +385,6 @@ with gr.Blocks() as demo:
|
|
387 |
with gr.Row():
|
388 |
out = gr.Image(width=256)
|
389 |
btn.click(fn=update, inputs=[model_id_white, model_id_black], outputs=out)
|
|
|
390 |
|
391 |
demo.launch()
|
|
|
204 |
white_bar = tqdm(total=time_budget_white, desc=f"{model_id_white.split('/')[-1]}:", bar_format=white_bar_format, colour='white')
|
205 |
black_bar = tqdm(total=time_budget_black, desc=f"{model_id_black.split('/')[-1]}:", bar_format=black_bar_format, colour='black')
|
206 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
207 |
elo_ratings_df = pd.read_csv("chessllm_leaderboard.csv")
|
208 |
|
209 |
# Game loop
|
|
|
361 |
RESULT_GIST_ID = "c491299e7b8a45a61ce5403a70cf8656"
|
362 |
LEAD_GIST_ID = "696115fe2df47fb2350fcff2663678c9"
|
363 |
|
364 |
+
# Download results and leaderboard
|
365 |
+
url1 = (f"https://gist.githubusercontent.com/chessllm/{RESULT_GIST_ID}/raw")
|
366 |
+
download_file(url1, "chessllm_results.csv")
|
367 |
+
url2 = f"https://gist.githubusercontent.com/chessllm/{LEAD_GIST_ID}/raw"
|
368 |
+
download_file(url2, "chessllm_leaderboard.csv")
|
369 |
+
elo_ratings_df = pd.read_csv("chessllm_leaderboard.csv")
|
370 |
+
|
371 |
title = """
|
372 |
<div align="center">
|
373 |
<h1>⚔️ Chess LLM Arena</h1>
|
|
|
385 |
with gr.Row():
|
386 |
out = gr.Image(width=256)
|
387 |
btn.click(fn=update, inputs=[model_id_white, model_id_black], outputs=out)
|
388 |
+
gr.Dataframe(value=elo_ratings_df)
|
389 |
|
390 |
demo.launch()
|