sh1gechan commited on
Commit
fd6c58e
1 Parent(s): 376ee92

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -4
app.py CHANGED
@@ -445,14 +445,16 @@ with gr.Blocks() as demo_leaderboard:
445
  def toggle_all_categories(action: str, shown_columns_dict: dict):
446
  """全カテゴリーのチェックボックスを一括制御する関数"""
447
  results = []
448
- for task_type in TaskType: # NotTaskも含めて処理
449
  if task_type == TaskType.NotTask:
450
- # Model detailsカテゴリーの処理
451
  results.append([
452
  c.name
453
  for c in fields(AutoEvalColumn)
454
- if not c.hidden and not c.never_hidden and not c.dummy and c.task_type == task_type
455
- ] if action == "all" else [])
 
 
456
  else:
457
  if action == "all":
458
  # 全選択
 
445
  def toggle_all_categories(action: str, shown_columns_dict: dict):
446
  """全カテゴリーのチェックボックスを一括制御する関数"""
447
  results = []
448
+ for task_type in TaskType:
449
  if task_type == TaskType.NotTask:
450
+ # Model detailsの場合は既存の選択状態を維持
451
  results.append([
452
  c.name
453
  for c in fields(AutoEvalColumn)
454
+ if not c.hidden and not c.never_hidden and not c.dummy
455
+ and c.task_type == task_type
456
+ and c.displayed_by_default # デフォルトの表示状態を維持
457
+ ])
458
  else:
459
  if action == "all":
460
  # 全選択