sheonhan commited on
Commit
c131125
β€’
1 Parent(s): 4c8dd3c

Simply layout

Browse files
Files changed (1) hide show
  1. app.py +48 -57
app.py CHANGED
@@ -312,53 +312,47 @@ with demo:
312
  with gr.Accordion("CHANGELOG", open=False):
313
  changelog = gr.Markdown(CHANGELOG_TEXT, elem_id="changelog-text")
314
 
315
- with gr.Row():
316
- leaderboard_table = gr.components.Dataframe(
317
- value=leaderboard, headers=COLS, datatype=TYPES, max_rows=5
318
- )
319
 
320
- with gr.Row():
321
- gr.Markdown(EVALUATION_QUEUE_TEXT, elem_classes="markdown-text")
322
 
323
  with gr.Accordion("βœ… Finished Evaluations", open=False):
324
- with gr.Row():
325
- finished_eval_table = gr.components.Dataframe(
326
- value=finished_eval_queue,
327
- headers=EVAL_COLS,
328
- datatype=EVAL_TYPES,
329
- max_rows=5,
330
- )
331
  with gr.Accordion("πŸ”„ Running Evaluation Queue", open=False):
332
- with gr.Row():
333
- running_eval_table = gr.components.Dataframe(
334
- value=running_eval_queue,
335
- headers=EVAL_COLS,
336
- datatype=EVAL_TYPES,
337
- max_rows=5,
338
- )
339
 
340
  with gr.Accordion("⏳ Pending Evaluation Queue", open=False):
341
- with gr.Row():
342
- pending_eval_table = gr.components.Dataframe(
343
- value=pending_eval_queue,
344
- headers=EVAL_COLS,
345
- datatype=EVAL_TYPES,
346
- max_rows=5,
347
- )
348
-
349
- with gr.Row():
350
- refresh_button = gr.Button("Refresh")
351
- refresh_button.click(
352
- refresh,
353
- inputs=[],
354
- outputs=[
355
- leaderboard_table,
356
- finished_eval_table,
357
- running_eval_table,
358
- pending_eval_table,
359
- ],
360
  )
361
 
 
 
 
 
 
 
 
 
 
 
 
 
362
  with gr.Accordion("Submit a new model for evaluation"):
363
  with gr.Row():
364
  with gr.Column():
@@ -373,25 +367,22 @@ with demo:
373
  is_delta_weight = gr.Checkbox(False, label="Delta weights")
374
  base_model_name_textbox = gr.Textbox(label="base model (for delta)")
375
 
376
- with gr.Row():
377
- submit_button = gr.Button("Submit Eval")
378
-
379
- with gr.Row():
380
- submission_result = gr.Markdown()
381
- submit_button.click(
382
- add_new_eval,
383
- [
384
- model_name_textbox,
385
- base_model_name_textbox,
386
- revision_name_textbox,
387
- is_8bit_toggle,
388
- private,
389
- is_delta_weight,
390
- ],
391
- submission_result,
392
- )
393
 
394
  scheduler = BackgroundScheduler()
395
- scheduler.add_job(restart_space, 'interval', seconds=3600)
396
  scheduler.start()
397
  demo.launch()
 
312
  with gr.Accordion("CHANGELOG", open=False):
313
  changelog = gr.Markdown(CHANGELOG_TEXT, elem_id="changelog-text")
314
 
315
+ leaderboard_table = gr.components.Dataframe(
316
+ value=leaderboard, headers=COLS, datatype=TYPES, max_rows=5
317
+ )
 
318
 
319
+ gr.Markdown(EVALUATION_QUEUE_TEXT, elem_classes="markdown-text")
 
320
 
321
  with gr.Accordion("βœ… Finished Evaluations", open=False):
322
+ finished_eval_table = gr.components.Dataframe(
323
+ value=finished_eval_queue,
324
+ headers=EVAL_COLS,
325
+ datatype=EVAL_TYPES,
326
+ max_rows=5,
327
+ )
 
328
  with gr.Accordion("πŸ”„ Running Evaluation Queue", open=False):
329
+ running_eval_table = gr.components.Dataframe(
330
+ value=running_eval_queue,
331
+ headers=EVAL_COLS,
332
+ datatype=EVAL_TYPES,
333
+ max_rows=5,
334
+ )
 
335
 
336
  with gr.Accordion("⏳ Pending Evaluation Queue", open=False):
337
+ pending_eval_table = gr.components.Dataframe(
338
+ value=pending_eval_queue,
339
+ headers=EVAL_COLS,
340
+ datatype=EVAL_TYPES,
341
+ max_rows=5,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
342
  )
343
 
344
+ refresh_button = gr.Button("Refresh")
345
+ refresh_button.click(
346
+ refresh,
347
+ inputs=[],
348
+ outputs=[
349
+ leaderboard_table,
350
+ finished_eval_table,
351
+ running_eval_table,
352
+ pending_eval_table,
353
+ ],
354
+ )
355
+
356
  with gr.Accordion("Submit a new model for evaluation"):
357
  with gr.Row():
358
  with gr.Column():
 
367
  is_delta_weight = gr.Checkbox(False, label="Delta weights")
368
  base_model_name_textbox = gr.Textbox(label="base model (for delta)")
369
 
370
+ submit_button = gr.Button("Submit Eval")
371
+ submission_result = gr.Markdown()
372
+ submit_button.click(
373
+ add_new_eval,
374
+ [
375
+ model_name_textbox,
376
+ base_model_name_textbox,
377
+ revision_name_textbox,
378
+ is_8bit_toggle,
379
+ private,
380
+ is_delta_weight,
381
+ ],
382
+ submission_result,
383
+ )
 
 
 
384
 
385
  scheduler = BackgroundScheduler()
386
+ scheduler.add_job(restart_space, "interval", seconds=3600)
387
  scheduler.start()
388
  demo.launch()