hysts HF staff commited on
Commit
06b3207
·
1 Parent(s): 0b1a880
Files changed (1) hide show
  1. app.py +4 -10
app.py CHANGED
@@ -232,7 +232,7 @@ def load_query(request: gr.Request): # triggered only once at startup => read q
232
  ) # return one for the "search_bar", one for a hidden component that triggers a reload only if value has changed
233
 
234
 
235
- def toggle_all_categories(action: str, shown_columns_dict: dict):
236
  """全カテゴリーのチェックボックスを一括制御する関数"""
237
  results = []
238
  for task_type in TaskType:
@@ -330,15 +330,9 @@ with gr.Blocks() as demo_leaderboard:
330
  shown_columns_dict = {}
331
  checkboxes = []
332
  with gr.Row():
333
- gr.Button("全選択", size="sm").click(
334
- fn=lambda: toggle_all_categories("all", shown_columns_dict), outputs=checkboxes
335
- )
336
- gr.Button("全解除", size="sm").click(
337
- fn=lambda: toggle_all_categories("none", shown_columns_dict), outputs=checkboxes
338
- )
339
- gr.Button("AVGのみ", size="sm").click(
340
- fn=lambda: toggle_all_categories("avg_only", shown_columns_dict), outputs=checkboxes
341
- )
342
 
343
  for task_type in TaskType:
344
  if task_type == TaskType.NotTask:
 
232
  ) # return one for the "search_bar", one for a hidden component that triggers a reload only if value has changed
233
 
234
 
235
+ def toggle_all_categories(action: str):
236
  """全カテゴリーのチェックボックスを一括制御する関数"""
237
  results = []
238
  for task_type in TaskType:
 
330
  shown_columns_dict = {}
331
  checkboxes = []
332
  with gr.Row():
333
+ gr.Button("全選択", size="sm").click(fn=lambda: toggle_all_categories("all"), outputs=checkboxes)
334
+ gr.Button("全解除", size="sm").click(fn=lambda: toggle_all_categories("none"), outputs=checkboxes)
335
+ gr.Button("AVGのみ", size="sm").click(fn=lambda: toggle_all_categories("avg_only"), outputs=checkboxes)
 
 
 
 
 
 
336
 
337
  for task_type in TaskType:
338
  if task_type == TaskType.NotTask: