mlabonne commited on
Commit
f21083c
·
verified ·
1 Parent(s): 03e9a4f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -5
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
@@ -445,19 +445,23 @@ title = """
445
  <p><em>Pick two chess LLMs and make them compete in a chess match. When the game is over, it will automatically update the crowd-sourced leaderboard. Build a dataset and train your own small language model to compete in the arena.</em></p>
446
  </div>
447
  """
 
 
 
448
 
449
  with gr.Blocks(theme=gr.themes.Monochrome()) as demo:
450
  gr.Markdown(title)
451
  with gr.Row():
452
- model_id_white = gr.Textbox(label="White Model ID", value="mlabonne/chesspythia-70m")
453
- model_id_black = gr.Textbox(label="Black Model ID", value="EleutherAI/pythia-70m-deduped")
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>')
461
  leaderboard = gr.Dataframe(value=get_leaderboard, every=60)
 
462
 
463
  demo.queue(api_open=False).launch(show_api=False)
 
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
 
445
  <p><em>Pick two chess LLMs and make them compete in a chess match. When the game is over, it will automatically update the crowd-sourced leaderboard. Build a dataset and train your own small language model to compete in the arena.</em></p>
446
  </div>
447
  """
448
+ footer = """
449
+ <p><em>Made by Maxime Labonne, Kostis Gourgoulias, and Ruchi Bahl.</em></p>
450
+ """
451
 
452
  with gr.Blocks(theme=gr.themes.Monochrome()) as demo:
453
  gr.Markdown(title)
454
  with gr.Row():
455
+ model_id_white = gr.Textbox(label="White Model ID", value="mlabonne/chesspythia-70m")
456
+ model_id_black = gr.Textbox(label="Black Model ID", value="EleutherAI/pythia-70m-deduped")
457
  btn = gr.Button("Fight!")
458
  with gr.Row():
459
  gr.HTML("""<div id='chessboard' style='width: 50%; display: block;'></div>""")
460
  out = gr.Image(value=image, show_label=False, show_share_button=False, show_download_button=False, elem_id="chessboard")
461
  gr.HTML("""<div id='rightblock' style='width: 50%; display: block;'></div>""")
462
  btn.click(fn=update, inputs=[model_id_white, model_id_black], outputs=out)
463
+ gr.Markdown('<div align="center"><p style="font-size: 30px;">🏆 Leaderboard</p></div>')
464
  leaderboard = gr.Dataframe(value=get_leaderboard, every=60)
465
+ gr.Markdown(footer)
466
 
467
  demo.queue(api_open=False).launch(show_api=False)