Jae-Won Chung commited on
Commit
1138cdd
1 Parent(s): 07a2d08

Fix radio button default

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -133,9 +133,9 @@ class TableManager:
133
  def get_dropdown(self):
134
  columns = self.full_df.columns.tolist()[1:]
135
  return [
136
- gr.Dropdown(value="gpu", choices=columns, label="X"),
137
- gr.Dropdown(value="nlp_average", choices=columns, label="Y"),
138
- gr.Dropdown(value="energy_eff", choices=["None", *columns], label="Z (optional)"),
139
  ]
140
 
141
  def update_dropdown(self):
@@ -288,7 +288,7 @@ with block:
288
  checkboxes = []
289
  for key, choices in global_tbm.schema.items():
290
  # Specifying `value` makes everything checked by default.
291
- checkboxes.append(gr.CheckboxGroup(choices=choices, value=choices, label=key))
292
 
293
  # Block 1: Leaderboard table.
294
  with gr.Row():
 
133
  def get_dropdown(self):
134
  columns = self.full_df.columns.tolist()[1:]
135
  return [
136
+ gr.Dropdown(value="nlp_average", choices=columns, label="X"),
137
+ gr.Dropdown(value="energy_eff", choices=columns, label="Y"),
138
+ gr.Dropdown(choices=["None", *columns], label="Z (optional)"),
139
  ]
140
 
141
  def update_dropdown(self):
 
288
  checkboxes = []
289
  for key, choices in global_tbm.schema.items():
290
  # Specifying `value` makes everything checked by default.
291
+ checkboxes.append(gr.CheckboxGroup(choices=choices, value=choices[:1], label=key))
292
 
293
  # Block 1: Leaderboard table.
294
  with gr.Row():