lukehinds commited on
Commit
5c1ec97
·
1 Parent(s): 47d9606

Resolve TypeError when processing evaluation queue data

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -283,17 +283,16 @@ with demo:
283
  revision=revision if revision else "main"
284
  )
285
 
286
- # Update pending evaluations table
287
- pending_eval_queue_df = get_evaluation_queue_df(EVAL_REQUESTS_PATH, EVAL_COLS)[2]
288
- pending_eval_table.update(value=pending_eval_queue_df)
289
 
290
  # Start processing queue in background
291
  scheduler.add_job(process_evaluation_queue, id='process_queue_job', replace_existing=True)
292
 
293
- return gr.Markdown("Submission successful! Your model has been added to the evaluation queue. Please check the 'Pending Evaluation Queue' for status updates.")
294
  except Exception as e:
295
  logger.error(f"Submission failed: {str(e)}")
296
- return gr.Markdown(f"Error: {str(e)}")
297
 
298
  submit_button.click(
299
  handle_submission,
 
283
  revision=revision if revision else "main"
284
  )
285
 
286
+ # Get updated pending evaluations
287
+ _, _, pending_eval_queue_df = get_evaluation_queue_df(EVAL_REQUESTS_PATH, EVAL_COLS)
 
288
 
289
  # Start processing queue in background
290
  scheduler.add_job(process_evaluation_queue, id='process_queue_job', replace_existing=True)
291
 
292
+ return gr.Markdown("Submission successful! Your model has been added to the evaluation queue. Please check the 'Pending Evaluation Queue' for status updates."), pending_eval_queue_df
293
  except Exception as e:
294
  logger.error(f"Submission failed: {str(e)}")
295
+ return gr.Markdown(f"Error: {str(e)}"), None
296
 
297
  submit_button.click(
298
  handle_submission,