henryL7 commited on
Commit
9cfe6cd
β€’
1 Parent(s): 8178593

clean layout

Browse files
Files changed (3) hide show
  1. .gitignore +1 -0
  2. app.py +103 -87
  3. src/envs.py +1 -1
.gitignore CHANGED
@@ -11,3 +11,4 @@ eval-results/
11
  eval-queue-bk/
12
  eval-results-bk/
13
  logs/
 
 
11
  eval-queue-bk/
12
  eval-results-bk/
13
  logs/
14
+ envs/
app.py CHANGED
@@ -140,104 +140,120 @@ with demo:
140
  with gr.Tabs(elem_classes="tab-buttons") as tabs:
141
  with gr.TabItem("πŸ… LLM Benchmark", elem_id="llm-benchmark-tab-table", id=0):
142
  with gr.Row():
143
- with gr.Column():
144
- with gr.Row():
145
- search_bar = gr.Textbox(
146
- placeholder=" πŸ” Search for your model (separate multiple queries with `;`) and press ENTER...",
147
- show_label=False,
148
- elem_id="search-bar",
149
- )
150
- with gr.Row():
151
- shown_columns = gr.CheckboxGroup(
152
- choices=[
153
- c.name
154
- for c in fields(AutoEvalColumn)
155
- if not c.hidden and not c.never_hidden
156
- ],
157
- value=[
158
- c.name
159
- for c in fields(AutoEvalColumn)
160
- if c.displayed_by_default and not c.hidden and not c.never_hidden
161
- ],
162
- label="Select columns to show",
163
- elem_id="column-select",
164
- interactive=True,
165
- )
166
- with gr.Row():
167
- deleted_models_visibility = gr.Checkbox(
168
- value=False, label="Show gated/private/deleted models", interactive=True
169
- )
170
- with gr.Column(min_width=320):
171
- #with gr.Box(elem_id="box-filter"):
172
- filter_columns_type = gr.CheckboxGroup(
173
- label="Model types",
174
- choices=[t.to_str() for t in ModelType],
175
- value=[t.to_str() for t in ModelType],
176
- interactive=True,
177
- elem_id="filter-columns-type",
178
- )
179
- filter_columns_precision = gr.CheckboxGroup(
180
- label="Precision",
181
- choices=[i.value.name for i in Precision],
182
- value=[i.value.name for i in Precision],
183
- interactive=True,
184
- elem_id="filter-columns-precision",
185
- )
186
- filter_columns_size = gr.CheckboxGroup(
187
- label="Model sizes (in billions of parameters)",
188
- choices=list(NUMERIC_INTERVALS.keys()),
189
- value=list(NUMERIC_INTERVALS.keys()),
190
- interactive=True,
191
- elem_id="filter-columns-size",
192
- )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
193
 
194
  leaderboard_table = gr.components.Dataframe(
195
  value=leaderboard_df[
196
  [c.name for c in fields(AutoEvalColumn) if c.never_hidden]
197
- + shown_columns.value
198
  ],
199
- headers=[c.name for c in fields(AutoEvalColumn) if c.never_hidden] + shown_columns.value,
200
  datatype=TYPES,
201
  elem_id="leaderboard-table",
202
  interactive=False,
203
  visible=True,
204
  )
205
 
206
- # Dummy leaderboard for handling the case when the user uses backspace key
207
- hidden_leaderboard_table_for_search = gr.components.Dataframe(
208
- value=original_df[COLS],
209
- headers=COLS,
210
- datatype=TYPES,
211
- visible=False,
212
- )
213
- search_bar.submit(
214
- update_table,
215
- [
216
- hidden_leaderboard_table_for_search,
217
- shown_columns,
218
- filter_columns_type,
219
- filter_columns_precision,
220
- filter_columns_size,
221
- deleted_models_visibility,
222
- search_bar,
223
- ],
224
- leaderboard_table,
225
- )
226
- for selector in [shown_columns, filter_columns_type, filter_columns_precision, filter_columns_size, deleted_models_visibility]:
227
- selector.change(
228
- update_table,
229
- [
230
- hidden_leaderboard_table_for_search,
231
- shown_columns,
232
- filter_columns_type,
233
- filter_columns_precision,
234
- filter_columns_size,
235
- deleted_models_visibility,
236
- search_bar,
237
- ],
238
- leaderboard_table,
239
- queue=True,
240
- )
241
 
242
  with gr.TabItem("πŸ“ About", elem_id="llm-benchmark-tab-table", id=2):
243
  gr.Markdown(LLM_BENCHMARKS_TEXT, elem_classes="markdown-text")
 
140
  with gr.Tabs(elem_classes="tab-buttons") as tabs:
141
  with gr.TabItem("πŸ… LLM Benchmark", elem_id="llm-benchmark-tab-table", id=0):
142
  with gr.Row():
143
+ search_bar = gr.Textbox(
144
+ placeholder=" πŸ” Search for the model (separate multiple queries with `;`) and press ENTER...",
145
+ show_label=False,
146
+ elem_id="search-bar",
147
+ )
148
+ # with gr.Column():
149
+ # with gr.Row():
150
+ # search_bar = gr.Textbox(
151
+ # placeholder=" πŸ” Search for the model (separate multiple queries with `;`) and press ENTER...",
152
+ # show_label=False,
153
+ # elem_id="search-bar",
154
+ # )
155
+ # with gr.Row():
156
+ # shown_columns = gr.CheckboxGroup(
157
+ # choices=[
158
+ # c.name
159
+ # for c in fields(AutoEvalColumn)
160
+ # if not c.hidden and not c.never_hidden
161
+ # ],
162
+ # value=[
163
+ # c.name
164
+ # for c in fields(AutoEvalColumn)
165
+ # if c.displayed_by_default and not c.hidden and not c.never_hidden
166
+ # ],
167
+ # label="Select columns to show",
168
+ # elem_id="column-select",
169
+ # interactive=True,
170
+ # )
171
+ # with gr.Row():
172
+ # deleted_models_visibility = gr.Checkbox(
173
+ # value=False, label="Show gated/private/deleted models", interactive=True
174
+ # )
175
+ # with gr.Column(min_width=320):
176
+ # #with gr.Box(elem_id="box-filter"):
177
+ # filter_columns_type = gr.CheckboxGroup(
178
+ # label="Model types",
179
+ # choices=[t.to_str() for t in ModelType],
180
+ # value=[t.to_str() for t in ModelType],
181
+ # interactive=True,
182
+ # elem_id="filter-columns-type",
183
+ # )
184
+ # filter_columns_precision = gr.CheckboxGroup(
185
+ # label="Precision",
186
+ # choices=[i.value.name for i in Precision],
187
+ # value=[i.value.name for i in Precision],
188
+ # interactive=True,
189
+ # elem_id="filter-columns-precision",
190
+ # )
191
+ # filter_columns_size = gr.CheckboxGroup(
192
+ # label="Model sizes (in billions of parameters)",
193
+ # choices=list(NUMERIC_INTERVALS.keys()),
194
+ # value=list(NUMERIC_INTERVALS.keys()),
195
+ # interactive=True,
196
+ # elem_id="filter-columns-size",
197
+ # )
198
+
199
+ # leaderboard_table = gr.components.Dataframe(
200
+ # value=leaderboard_df[
201
+ # [c.name for c in fields(AutoEvalColumn) if c.never_hidden]
202
+ # + shown_columns.value
203
+ # ],
204
+ # headers=[c.name for c in fields(AutoEvalColumn) if c.never_hidden] + shown_columns.value,
205
+ # datatype=TYPES,
206
+ # elem_id="leaderboard-table",
207
+ # interactive=False,
208
+ # visible=True,
209
+ # )
210
 
211
  leaderboard_table = gr.components.Dataframe(
212
  value=leaderboard_df[
213
  [c.name for c in fields(AutoEvalColumn) if c.never_hidden]
 
214
  ],
215
+ headers=[c.name for c in fields(AutoEvalColumn) if c.never_hidden],
216
  datatype=TYPES,
217
  elem_id="leaderboard-table",
218
  interactive=False,
219
  visible=True,
220
  )
221
 
222
+ # # Dummy leaderboard for handling the case when the user uses backspace key
223
+ # hidden_leaderboard_table_for_search = gr.components.Dataframe(
224
+ # value=original_df[COLS],
225
+ # headers=COLS,
226
+ # datatype=TYPES,
227
+ # visible=False,
228
+ # )
229
+ # search_bar.submit(
230
+ # update_table,
231
+ # [
232
+ # hidden_leaderboard_table_for_search,
233
+ # shown_columns,
234
+ # filter_columns_type,
235
+ # filter_columns_precision,
236
+ # filter_columns_size,
237
+ # deleted_models_visibility,
238
+ # search_bar,
239
+ # ],
240
+ # leaderboard_table,
241
+ # )
242
+ # for selector in [shown_columns, filter_columns_type, filter_columns_precision, filter_columns_size, deleted_models_visibility]:
243
+ # selector.change(
244
+ # update_table,
245
+ # [
246
+ # hidden_leaderboard_table_for_search,
247
+ # shown_columns,
248
+ # filter_columns_type,
249
+ # filter_columns_precision,
250
+ # filter_columns_size,
251
+ # deleted_models_visibility,
252
+ # search_bar,
253
+ # ],
254
+ # leaderboard_table,
255
+ # queue=True,
256
+ # )
257
 
258
  with gr.TabItem("πŸ“ About", elem_id="llm-benchmark-tab-table", id=2):
259
  gr.Markdown(LLM_BENCHMARKS_TEXT, elem_classes="markdown-text")
src/envs.py CHANGED
@@ -6,7 +6,7 @@ from huggingface_hub import HfApi
6
  # ----------------------------------
7
  TOKEN = os.environ.get("TOKEN") # A read/write token for your org
8
 
9
- OWNER = "demo-leaderboard-backend" # Change to your org - don't forget to create a results and request dataset, with the correct format!
10
  # ----------------------------------
11
 
12
  REPO_ID = f"{OWNER}/leaderboard"
 
6
  # ----------------------------------
7
  TOKEN = os.environ.get("TOKEN") # A read/write token for your org
8
 
9
+ OWNER = "yale-nlp" # Change to your org - don't forget to create a results and request dataset, with the correct format!
10
  # ----------------------------------
11
 
12
  REPO_ID = f"{OWNER}/leaderboard"