pufanyi commited on
Commit
becab7c
β€’
1 Parent(s): e5a7fef

Refactor init_leaderboard function to add detailed results tab and improve UI

Browse files
Files changed (1) hide show
  1. app.py +12 -22
app.py CHANGED
@@ -137,26 +137,16 @@ def init_leaderboard(dataframes):
137
  research_textbox.submit(update_data, inputs=[selected_subset, research_textbox, selected_columns], outputs=df)
138
  selected_columns.change(update_data, inputs=[selected_subset, research_textbox, selected_columns], outputs=df)
139
 
140
- # return Leaderboard(
141
- # value=dataframes,
142
- # datatype=[c.type for c in fields(AutoEvalColumn)],
143
- # select_columns=SelectColumns(
144
- # default_selection=[c.name for c in fields(AutoEvalColumn) if c.displayed_by_default],
145
- # cant_deselect=[c.name for c in fields(AutoEvalColumn) if c.never_hidden],
146
- # label="Select Columns to Display:",
147
- # ),
148
- # search_columns=[AutoEvalColumn.model.name],
149
- # hide_columns=[c.name for c in fields(AutoEvalColumn) if c.hidden],
150
- # filter_columns=[
151
- # ColumnFilter(
152
- # column=AutoEvalColumn.dataset_version.name,
153
- # choices=subsets,
154
- # default=subsets[-1],
155
- # )
156
- # # gr.Dropdown(choices=subsets, label="Select Dataset Subset", value=subsets[-1])
157
- # ],
158
- # interactive=False,
159
- # )
160
 
161
 
162
  demo = gr.Blocks(css=custom_css)
@@ -168,8 +158,8 @@ with demo:
168
  with gr.TabItem("πŸ… LiveBench Results", elem_id="llm-benchmark-tab-table", id=0):
169
  init_leaderboard(LEADERBOARD_DF)
170
 
171
- with gr.TabItem("πŸ“ About", elem_id="llm-benchmark-tab-table", id=2):
172
- gr.Markdown(LLM_BENCHMARKS_TEXT, elem_classes="markdown-text")
173
 
174
  # with gr.Row():
175
  # with gr.Accordion("πŸ“™ Citation", open=False):
 
137
  research_textbox.submit(update_data, inputs=[selected_subset, research_textbox, selected_columns], outputs=df)
138
  selected_columns.change(update_data, inputs=[selected_subset, research_textbox, selected_columns], outputs=df)
139
 
140
+ def init_detailed_results():
141
+ with gr.Row():
142
+ gr.HTML("""\
143
+ <iframe
144
+ src="https://huggingface.co/datasets/lmms-lab/LiveBenchDetailedResults/embed/viewer/2024-06/internvl2_2b"
145
+ frameborder="0"
146
+ width="100%"
147
+ height="560px"
148
+ ></iframe>
149
+ """)
 
 
 
 
 
 
 
 
 
 
150
 
151
 
152
  demo = gr.Blocks(css=custom_css)
 
158
  with gr.TabItem("πŸ… LiveBench Results", elem_id="llm-benchmark-tab-table", id=0):
159
  init_leaderboard(LEADERBOARD_DF)
160
 
161
+ with gr.TabItem("πŸ“ Detailed Results", elem_id="llm-benchmark-tab-table", id=2):
162
+ init_detailed_results()
163
 
164
  # with gr.Row():
165
  # with gr.Accordion("πŸ“™ Citation", open=False):