Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Clean up
Browse files
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 |
-
|
283 |
-
with
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
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 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
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(
|