helene-rousset commited on
Commit
381a6f3
·
verified ·
1 Parent(s): c3bf584

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -7
app.py CHANGED
@@ -291,9 +291,19 @@ with gr.Blocks() as demo:
291
 
292
  gr.LoginButton()
293
 
294
- save_button = gr.Button("Save JSON")
295
-
296
  run_button = gr.Button("Run Evaluation & Submit All Answers")
 
 
 
 
 
 
 
 
 
 
 
 
297
 
298
  status_output = gr.Textbox(label="Run Status / Submission Result", lines=5, interactive=False)
299
  # Removed max_rows=10 from DataFrame constructor
@@ -303,11 +313,6 @@ with gr.Blocks() as demo:
303
  fn=run_and_submit_all,
304
  outputs=[status_output, results_table]
305
  )
306
-
307
- save_button.click(
308
- fn=save_fn,
309
- outputs=[status_output, results_table]
310
- )
311
 
312
 
313
  if __name__ == "__main__":
 
291
 
292
  gr.LoginButton()
293
 
 
 
294
  run_button = gr.Button("Run Evaluation & Submit All Answers")
295
+
296
+ with gr.Row():
297
+ update_task_id = gr.Textbox(label="Task ID to Update")
298
+ update_button = gr.Button("Update One Answer & Resubmit")
299
+
300
+ update_status = gr.Textbox(label="Update Submission Result", lines=4)
301
+
302
+ update_button.click(
303
+ fn=update_and_resubmit_one_answer,
304
+ inputs=[update_task_id, gr.OAuthProfile()],
305
+ outputs=[update_status, results_table]
306
+ )
307
 
308
  status_output = gr.Textbox(label="Run Status / Submission Result", lines=5, interactive=False)
309
  # Removed max_rows=10 from DataFrame constructor
 
313
  fn=run_and_submit_all,
314
  outputs=[status_output, results_table]
315
  )
 
 
 
 
 
316
 
317
 
318
  if __name__ == "__main__":