natolambert commited on
Commit
b514443
1 Parent(s): 507a14d
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -2,7 +2,6 @@ import gradio as gr
2
  import pandas as pd
3
  from pathlib import Path
4
  from datasets import load_dataset
5
- import json
6
  import os
7
  from huggingface_hub import HfApi, Repository
8
  import numpy as np
@@ -111,6 +110,7 @@ A win is when the score for the chosen response is higher than the score for the
111
  For more details, see the [dataset](https://huggingface.co/datasets/ai2-rlhf-collab/rm-benchmark-dev).
112
  """
113
  leaderboard_data = fetch_and_display_data()
 
114
  with gr.Blocks() as app:
115
  with gr.Row():
116
  gr.Markdown(benchmark_text)
@@ -118,7 +118,9 @@ with gr.Blocks() as app:
118
  with gr.Row():
119
  output_table = gr.Dataframe(
120
  leaderboard_data.values,
 
121
  headers=leaderboard_data.columns.tolist(),
 
122
  )
123
 
124
  # Load data when app starts
 
2
  import pandas as pd
3
  from pathlib import Path
4
  from datasets import load_dataset
 
5
  import os
6
  from huggingface_hub import HfApi, Repository
7
  import numpy as np
 
110
  For more details, see the [dataset](https://huggingface.co/datasets/ai2-rlhf-collab/rm-benchmark-dev).
111
  """
112
  leaderboard_data = fetch_and_display_data()
113
+ col_types = ["markdown"] + ["number"] * (len(leaderboard_data.columns) - 1)
114
  with gr.Blocks() as app:
115
  with gr.Row():
116
  gr.Markdown(benchmark_text)
 
118
  with gr.Row():
119
  output_table = gr.Dataframe(
120
  leaderboard_data.values,
121
+ datatype=col_types,
122
  headers=leaderboard_data.columns.tolist(),
123
+ elem_id="leaderboard_dataframe",
124
  )
125
 
126
  # Load data when app starts