idolezal commited on
Commit
11fbc90
ยท
1 Parent(s): 10151dc

Fix last commit

Browse files
Files changed (1) hide show
  1. app.py +9 -4
app.py CHANGED
@@ -158,10 +158,15 @@ def fetch_model_detail(submission_id):
158
  )
159
 
160
  def fetch_model_tournament_results_table(submission_id, category):
161
- return gr.update(
162
- value=leaderboard_server.get_model_tournament_table(submission_id, category),
163
- visible=True,
164
- )
 
 
 
 
 
165
 
166
  def change_leaderboard_category(category, selected_submission_id):
167
  if category == leaderboard_server.TASKS_CATEGORY_OVERALL:
 
158
  )
159
 
160
  def fetch_model_tournament_results_table(submission_id, category):
161
+ if submission_id == None:
162
+ return gr.update(
163
+ visible=False,
164
+ )
165
+ else:
166
+ return gr.update(
167
+ value=leaderboard_server.get_model_tournament_table(submission_id, category),
168
+ visible=True,
169
+ )
170
 
171
  def change_leaderboard_category(category, selected_submission_id):
172
  if category == leaderboard_server.TASKS_CATEGORY_OVERALL: