henryL7 commited on
Commit
07c333a
β€’
1 Parent(s): 969c59e

interface update

Browse files
Files changed (3) hide show
  1. app.py +7 -0
  2. src/logo.png +0 -0
  3. src/populate.py +6 -1
app.py CHANGED
@@ -21,7 +21,13 @@ restart_space()
21
  demo = gr.Blocks(css=custom_css)
22
  with demo:
23
  gr.HTML(TITLE)
 
24
  gr.Markdown(INTRODUCTION_TEXT, elem_classes="markdown-text")
 
 
 
 
 
25
 
26
  with gr.Tabs(elem_classes="tab-buttons") as tabs:
27
  with gr.TabItem("πŸ… LLM Benchmark", elem_id="llm-benchmark-tab-table", id=0):
@@ -29,6 +35,7 @@ with demo:
29
  leaderboard_table = gr.components.Dataframe(
30
  value=leaderboard_df,
31
  # headers=dummy_leaderboard.HEADERS,
 
32
  datatype=populate.TYPES,
33
  elem_id="leaderboard-table",
34
  interactive=False,
 
21
  demo = gr.Blocks(css=custom_css)
22
  with demo:
23
  gr.HTML(TITLE)
24
+ # with gr.Column(scale=5):
25
  gr.Markdown(INTRODUCTION_TEXT, elem_classes="markdown-text")
26
+ # with gr.Column(scale=2):
27
+ # gr.Markdown("""
28
+ # ![](src/logo.png)
29
+ # """)
30
+
31
 
32
  with gr.Tabs(elem_classes="tab-buttons") as tabs:
33
  with gr.TabItem("πŸ… LLM Benchmark", elem_id="llm-benchmark-tab-table", id=0):
 
35
  leaderboard_table = gr.components.Dataframe(
36
  value=leaderboard_df,
37
  # headers=dummy_leaderboard.HEADERS,
38
+ headers=["", "Model", "Accuracy", "Agreement", "Self-Accuracy", "Self-Agreement"],
39
  datatype=populate.TYPES,
40
  elem_id="leaderboard-table",
41
  interactive=False,
src/logo.png ADDED
src/populate.py CHANGED
@@ -99,4 +99,9 @@ def load_leaderboard() -> pd.DataFrame:
99
  predictions["Agreement"].append(agr)
100
  predictions["Self-Accuracy"].append(models_acc)
101
  predictions["Self-Agreement"].append(models_agr)
102
- return pd.DataFrame(predictions).sort_values(by="Agreement", ascending=False).round(decimals=3)
 
 
 
 
 
 
99
  predictions["Agreement"].append(agr)
100
  predictions["Self-Accuracy"].append(models_acc)
101
  predictions["Self-Agreement"].append(models_agr)
102
+ df = pd.DataFrame(predictions).sort_values(by="Agreement", ascending=False).round(decimals=3)
103
+ df.reset_index(drop=True, inplace=True)
104
+ df[' '] = pd.Series(range(1, len(df) + 1))
105
+ columns = [' '] + [col for col in df.columns if col != ' ']
106
+ df = df[columns]
107
+ return df