hysts HF staff commited on
Commit
d683bb2
1 Parent(s): 196151e
Files changed (1) hide show
  1. app.py +80 -82
app.py CHANGED
@@ -279,89 +279,87 @@ leaderboard_df_filtered = select_columns(leaderboard_df, initial_columns)
279
 
280
  with gr.Blocks() as demo_leaderboard:
281
  with gr.Row():
282
- with gr.Column():
283
- with gr.Row():
284
- search_bar = gr.Textbox(
285
- placeholder=" 🔍 Search for your model (separate multiple queries with `;`) and press ENTER...",
286
- show_label=False,
287
- elem_id="search-bar",
288
- )
289
- with gr.Row():
290
- shown_columns_dict = {}
291
- for task_type in TaskType:
292
- if task_type == TaskType.NotTask:
293
- label = "Model details"
294
- else:
295
- label = task_type.value
296
- with gr.Accordion(label, open=True, elem_classes="accordion"):
297
- with gr.Row(height=110):
298
- shown_column = gr.CheckboxGroup(
299
- show_label=False,
300
- choices=[
301
- c.name
302
- for c in fields(AutoEvalColumn)
303
- if not c.hidden and not c.never_hidden and not c.dummy and c.task_type == task_type
304
- # and not c.average
305
- # or (task_type == TaskType.AVG and c.average)
306
- ],
307
- value=[
308
- c.name
309
- for c in fields(AutoEvalColumn)
310
- if c.displayed_by_default
311
- and not c.hidden
312
- and not c.never_hidden
313
- and c.task_type == task_type
314
- # and not c.average
315
- # or (task_type == TaskType.AVG and c.average)
316
- ],
317
- elem_id="column-select",
318
- container=False,
319
- )
320
- shown_columns_dict[task_type.name] = shown_column
321
- with gr.Accordion("Details - 詳細表示"):
322
- with gr.Column(min_width=320):
323
- filter_columns_type = gr.CheckboxGroup(
324
- label="Model types",
325
- choices=[t.to_str() for t in ModelType],
326
- value=[t.to_str() for t in ModelType],
327
- elem_id="filter-columns-type",
328
- )
329
- filter_columns_precision = gr.CheckboxGroup(
330
- label="Precision",
331
- choices=[i.value.name for i in Precision],
332
- value=[i.value.name for i in Precision],
333
- elem_id="filter-columns-precision",
334
- )
335
- filter_columns_size = gr.CheckboxGroup(
336
- label="Model sizes (in billions of parameters)",
337
- choices=list(NUMERIC_INTERVALS.keys()),
338
- value=list(NUMERIC_INTERVALS.keys()),
339
- elem_id="filter-columns-size",
340
- )
341
- filter_columns_add_special_tokens = gr.CheckboxGroup(
342
- label="Add Special Tokens",
343
- choices=[i.value.name for i in AddSpecialTokens],
344
- value=[i.value.name for i in AddSpecialTokens],
345
- elem_id="filter-columns-add-special-tokens",
346
- )
347
- filter_columns_num_few_shots = gr.CheckboxGroup(
348
- label="Num Few Shots",
349
- choices=[i.value.name for i in NumFewShots],
350
- value=[i.value.name for i in NumFewShots],
351
- elem_id="filter-columns-num-few-shots",
352
- )
353
- filter_columns_version = gr.CheckboxGroup(
354
- label="llm-jp-eval version",
355
- choices=[i.value.name for i in Version],
356
- value=[i.value.name for i in Version],
357
- elem_id="filter-columns-version",
358
  )
359
- # filter_columns_backend = gr.CheckboxGroup(
360
- # label="Backend Library",
361
- # choices=[i.value.name for i in Backend],
362
- # value=[i.value.name for i in Backend],
363
- # elem_id="filter-columns-backend",
364
- # )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
365
 
366
  # DataFrameコンポーネントの初期化
367
  leaderboard_table = gr.Dataframe(
 
279
 
280
  with gr.Blocks() as demo_leaderboard:
281
  with gr.Row():
282
+ search_bar = gr.Textbox(
283
+ placeholder=" 🔍 Search for your model (separate multiple queries with `;`) and press ENTER...",
284
+ show_label=False,
285
+ elem_id="search-bar",
286
+ )
287
+ with gr.Row():
288
+ shown_columns_dict = {}
289
+ for task_type in TaskType:
290
+ if task_type == TaskType.NotTask:
291
+ label = "Model details"
292
+ else:
293
+ label = task_type.value
294
+ with gr.Accordion(label, open=True, elem_classes="accordion"):
295
+ with gr.Row(height=110):
296
+ shown_column = gr.CheckboxGroup(
297
+ show_label=False,
298
+ choices=[
299
+ c.name
300
+ for c in fields(AutoEvalColumn)
301
+ if not c.hidden and not c.never_hidden and not c.dummy and c.task_type == task_type
302
+ # and not c.average
303
+ # or (task_type == TaskType.AVG and c.average)
304
+ ],
305
+ value=[
306
+ c.name
307
+ for c in fields(AutoEvalColumn)
308
+ if c.displayed_by_default
309
+ and not c.hidden
310
+ and not c.never_hidden
311
+ and c.task_type == task_type
312
+ # and not c.average
313
+ # or (task_type == TaskType.AVG and c.average)
314
+ ],
315
+ elem_id="column-select",
316
+ container=False,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
317
  )
318
+ shown_columns_dict[task_type.name] = shown_column
319
+ with gr.Accordion("Details - 詳細表示"):
320
+ with gr.Column(min_width=320):
321
+ filter_columns_type = gr.CheckboxGroup(
322
+ label="Model types",
323
+ choices=[t.to_str() for t in ModelType],
324
+ value=[t.to_str() for t in ModelType],
325
+ elem_id="filter-columns-type",
326
+ )
327
+ filter_columns_precision = gr.CheckboxGroup(
328
+ label="Precision",
329
+ choices=[i.value.name for i in Precision],
330
+ value=[i.value.name for i in Precision],
331
+ elem_id="filter-columns-precision",
332
+ )
333
+ filter_columns_size = gr.CheckboxGroup(
334
+ label="Model sizes (in billions of parameters)",
335
+ choices=list(NUMERIC_INTERVALS.keys()),
336
+ value=list(NUMERIC_INTERVALS.keys()),
337
+ elem_id="filter-columns-size",
338
+ )
339
+ filter_columns_add_special_tokens = gr.CheckboxGroup(
340
+ label="Add Special Tokens",
341
+ choices=[i.value.name for i in AddSpecialTokens],
342
+ value=[i.value.name for i in AddSpecialTokens],
343
+ elem_id="filter-columns-add-special-tokens",
344
+ )
345
+ filter_columns_num_few_shots = gr.CheckboxGroup(
346
+ label="Num Few Shots",
347
+ choices=[i.value.name for i in NumFewShots],
348
+ value=[i.value.name for i in NumFewShots],
349
+ elem_id="filter-columns-num-few-shots",
350
+ )
351
+ filter_columns_version = gr.CheckboxGroup(
352
+ label="llm-jp-eval version",
353
+ choices=[i.value.name for i in Version],
354
+ value=[i.value.name for i in Version],
355
+ elem_id="filter-columns-version",
356
+ )
357
+ # filter_columns_backend = gr.CheckboxGroup(
358
+ # label="Backend Library",
359
+ # choices=[i.value.name for i in Backend],
360
+ # value=[i.value.name for i in Backend],
361
+ # elem_id="filter-columns-backend",
362
+ # )
363
 
364
  # DataFrameコンポーネントの初期化
365
  leaderboard_table = gr.Dataframe(