idolezal commited on
Commit
305114d
β€’
1 Parent(s): 5293cc4

Fixed column_width in the table with tasks abbreviations

Browse files
Files changed (1) hide show
  1. app.py +5 -8
app.py CHANGED
@@ -146,15 +146,9 @@ def fetch_model_detail(submission_id):
146
  def change_leaderboard_category(category):
147
  if category == leaderboard_server.TASKS_CATEGORY_OVERALL:
148
  task_abbreviation_legend = gr.update(
149
- value=None,
150
- headers=None,
151
  visible=False,
152
  )
153
  else:
154
- task_abbreviation_legend_head = [
155
- "task abbreviation",
156
- "task name",
157
- ]
158
  task_abbreviation_legend_body = []
159
 
160
  abbreviation2name = leaderboard_server.CATEGORY_TO_TASK_ABBREVIATION_TO_NAME[category]
@@ -163,7 +157,6 @@ def change_leaderboard_category(category):
163
 
164
  task_abbreviation_legend = gr.update(
165
  value=task_abbreviation_legend_body,
166
- headers=task_abbreviation_legend_head,
167
  visible=True,
168
  )
169
 
@@ -287,7 +280,11 @@ with gr.Blocks(theme=gr.themes.Soft(text_size=text_md), css=custom_css) as main:
287
  with gr.Row():
288
  results_table_legend = gr.DataFrame(
289
  value=None,
290
- headers=None,
 
 
 
 
291
  datatype="str",
292
  label=None,
293
  visible=False,
 
146
  def change_leaderboard_category(category):
147
  if category == leaderboard_server.TASKS_CATEGORY_OVERALL:
148
  task_abbreviation_legend = gr.update(
 
 
149
  visible=False,
150
  )
151
  else:
 
 
 
 
152
  task_abbreviation_legend_body = []
153
 
154
  abbreviation2name = leaderboard_server.CATEGORY_TO_TASK_ABBREVIATION_TO_NAME[category]
 
157
 
158
  task_abbreviation_legend = gr.update(
159
  value=task_abbreviation_legend_body,
 
160
  visible=True,
161
  )
162
 
 
280
  with gr.Row():
281
  results_table_legend = gr.DataFrame(
282
  value=None,
283
+ headers=[
284
+ "task abbr.", # "task abbreviation"
285
+ "task name",
286
+ ],
287
+ column_widths=["150px"],
288
  datatype="str",
289
  label=None,
290
  visible=False,