Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Update app.py
Browse files
app.py
CHANGED
@@ -264,8 +264,8 @@ def update(model_id_white, model_id_black):
|
|
264 |
result = None
|
265 |
|
266 |
# Render first image
|
267 |
-
image = render_init(board)
|
268 |
-
yield image
|
269 |
|
270 |
# Time budget
|
271 |
time_budget_white = TIME_BUDGET
|
@@ -434,6 +434,9 @@ url1 = (f"https://gist.githubusercontent.com/chessllm/{RESULT_GIST_ID}/raw")
|
|
434 |
download_file(url1, "chessllm_results.csv")
|
435 |
elo_ratings_df = get_leaderboard()
|
436 |
|
|
|
|
|
|
|
437 |
|
438 |
title = """
|
439 |
<div align="center">
|
@@ -451,7 +454,7 @@ with gr.Blocks(theme=gr.themes.Monochrome()) as demo:
|
|
451 |
btn = gr.Button("Fight!")
|
452 |
with gr.Row():
|
453 |
gr.HTML("""<div id='chessboard' style='width: 50%; display: block;'></div>""")
|
454 |
-
out = gr.Image(show_label=False, show_share_button=False, show_download_button=False, elem_id="chessboard")
|
455 |
gr.HTML("""<div id='rightblock' style='width: 50%; display: block;'></div>""")
|
456 |
btn.click(fn=update, inputs=[model_id_white, model_id_black], outputs=out)
|
457 |
gr.Markdown('<div align="center"><p style="font-size: 36px;">🏆 Leaderboard</p></div>')
|
|
|
264 |
result = None
|
265 |
|
266 |
# Render first image
|
267 |
+
# image = render_init(board)
|
268 |
+
# yield image
|
269 |
|
270 |
# Time budget
|
271 |
time_budget_white = TIME_BUDGET
|
|
|
434 |
download_file(url1, "chessllm_results.csv")
|
435 |
elo_ratings_df = get_leaderboard()
|
436 |
|
437 |
+
# Render chessboard
|
438 |
+
board = chess.Board()
|
439 |
+
image = render_init(board)
|
440 |
|
441 |
title = """
|
442 |
<div align="center">
|
|
|
454 |
btn = gr.Button("Fight!")
|
455 |
with gr.Row():
|
456 |
gr.HTML("""<div id='chessboard' style='width: 50%; display: block;'></div>""")
|
457 |
+
out = gr.Image(value=image, show_label=False, show_share_button=False, show_download_button=False, elem_id="chessboard")
|
458 |
gr.HTML("""<div id='rightblock' style='width: 50%; display: block;'></div>""")
|
459 |
btn.click(fn=update, inputs=[model_id_white, model_id_black], outputs=out)
|
460 |
gr.Markdown('<div align="center"><p style="font-size: 36px;">🏆 Leaderboard</p></div>')
|