Blanca commited on
Commit
c451a74
·
verified ·
1 Parent(s): d776026

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -5
app.py CHANGED
@@ -65,8 +65,9 @@ def get_dataframe_from_results(eval_results, split):
65
  local_df = eval_results[split]
66
  local_df = local_df.map(lambda row: {"model": model_hyperlink(row["url"], row["model"])})
67
  local_df = local_df.remove_columns(["system_prompt", "url"])
68
- local_df = local_df.rename_column("model", "Agent name")
69
  local_df = local_df.rename_column("model_family", "Model family")
 
70
  local_df = local_df.rename_column("score", "Score (%)")
71
  local_df = local_df.rename_column("date", "Submission date")
72
  df = pd.DataFrame(local_df)
@@ -281,7 +282,7 @@ def add_new_eval(
281
 
282
 
283
  #return format_error(score)
284
- score = sum(scores)/len(scores)*100
285
  #print(score, flush=True)
286
 
287
 
@@ -367,7 +368,10 @@ with demo:
367
  value=CITATION_BUTTON_TEXT,
368
  label=CITATION_BUTTON_LABEL,
369
  elem_id="citation-button",
370
- ) #.style(show_copy_button=True)
 
 
 
371
 
372
  with gr.Tab("Results: Test"):
373
  leaderboard_table_test = gr.components.Dataframe(
@@ -384,12 +388,12 @@ with demo:
384
  with gr.Row():
385
  with gr.Column():
386
  level_of_test = gr.Radio(["test"], value="test", label="Split")
387
- model_name_textbox = gr.Textbox(label="Agent name")
388
  model_family_textbox = gr.Textbox(label="Model family")
389
  system_prompt_textbox = gr.Textbox(label="System prompt example")
390
  url_textbox = gr.Textbox(label="Url to model information")
391
  with gr.Column():
392
- organisation = gr.Textbox(label="Organisation")
393
  mail = gr.Textbox(label="Contact email (will be stored privately, & used if there is an issue with your submission)")
394
  file_output = gr.File()
395
 
 
65
  local_df = eval_results[split]
66
  local_df = local_df.map(lambda row: {"model": model_hyperlink(row["url"], row["model"])})
67
  local_df = local_df.remove_columns(["system_prompt", "url"])
68
+ local_df = local_df.rename_column("model", "Submission name")
69
  local_df = local_df.rename_column("model_family", "Model family")
70
+ local_df = local_df.rename_column("organisation", "Authors")
71
  local_df = local_df.rename_column("score", "Score (%)")
72
  local_df = local_df.rename_column("date", "Submission date")
73
  df = pd.DataFrame(local_df)
 
282
 
283
 
284
  #return format_error(score)
285
+ score = round(sum(scores)/len(scores)*100,3)
286
  #print(score, flush=True)
287
 
288
 
 
368
  value=CITATION_BUTTON_TEXT,
369
  label=CITATION_BUTTON_LABEL,
370
  elem_id="citation-button",
371
+ lines=5,
372
+ max_lines=10,
373
+ show_copy_button=True,
374
+ )
375
 
376
  with gr.Tab("Results: Test"):
377
  leaderboard_table_test = gr.components.Dataframe(
 
388
  with gr.Row():
389
  with gr.Column():
390
  level_of_test = gr.Radio(["test"], value="test", label="Split")
391
+ model_name_textbox = gr.Textbox(label="Submission name")
392
  model_family_textbox = gr.Textbox(label="Model family")
393
  system_prompt_textbox = gr.Textbox(label="System prompt example")
394
  url_textbox = gr.Textbox(label="Url to model information")
395
  with gr.Column():
396
+ organisation = gr.Textbox(label="Team name")
397
  mail = gr.Textbox(label="Contact email (will be stored privately, & used if there is an issue with your submission)")
398
  file_output = gr.File()
399