Lakoc commited on
Commit
d36cc05
Β·
1 Parent(s): 7639fd5

leaderboard server path fixes

Browse files
app.py CHANGED
@@ -39,13 +39,14 @@ def submit_model(task, datasets, hyp_file, submitted_by, model_id, token):
39
  "model_id": model_id.strip()
40
  }
41
  leaderboard_df = server.get_leaderboard()
42
- existing = leaderboard_df[
43
- (leaderboard_df["submitted_by"] == submitted_by.strip()) &
44
- (leaderboard_df["model_id"] == model_id.strip())
45
- ]
46
- if not existing.empty:
47
- return gr.update(value="❌ A submission with this name and model ID already exists.", visible=True), \
48
- gr.update(), gr.update(selected=1), gr.update(visible=False)
 
49
 
50
  try:
51
  server.prepare_model_for_submission(hyp_file.name, metadata, task, datasets)
 
39
  "model_id": model_id.strip()
40
  }
41
  leaderboard_df = server.get_leaderboard()
42
+ if len(leaderboard_df) > 0:
43
+ existing = leaderboard_df[
44
+ (leaderboard_df["submitted_by"] == submitted_by.strip()) &
45
+ (leaderboard_df["model_id"] == model_id.strip())
46
+ ]
47
+ if not existing.empty:
48
+ return gr.update(value="❌ A submission with this name and model ID already exists.", visible=True), \
49
+ gr.update(), gr.update(selected=1), gr.update(visible=False)
50
 
51
  try:
52
  server.prepare_model_for_submission(hyp_file.name, metadata, task, datasets)
references/{single_channel_gt2 β†’ single_channel_gt}/AMI-sdm_test.json RENAMED
File without changes
references/{single_channel_gt2 β†’ single_channel_gt}/Libri2Mix_test-both.json RENAMED
File without changes
references/{single_channel_gt2 β†’ single_channel_gt}/NOTSOFAR-1_eval-small.json RENAMED
File without changes