keynes42 commited on
Commit
584bea1
·
verified ·
1 Parent(s): ad3ce9f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -13
app.py CHANGED
@@ -324,21 +324,21 @@ with gr.Blocks() as demo:
324
  # Removed max_rows=10 from DataFrame constructor
325
  results_table = gr.DataFrame(label="Questions and Agent Answers", wrap=True)
326
 
327
- # 1) First handler: register the user/run event, skip the queue so it happens immediately
328
- run_button.click(
329
- fn=lambda: None, # no-op or a quick “start” callback
330
- inputs=[],
331
- outputs=[],
332
- queue=False
333
- ).then(
334
- # 2) Second handler: your long‐running generator
335
- fn=run_and_submit_all, # this function must `yield` (status, table)
336
- outputs=[status_output, results_table]
337
- )
338
  # run_button.click(
339
- # fn=run_and_submit_all,
340
- # outputs=[status_output, results_table],
 
 
 
 
 
 
341
  # )
 
 
 
 
342
 
343
  if __name__ == "__main__":
344
  print("\n" + "-"*30 + " App Starting " + "-"*30)
 
324
  # Removed max_rows=10 from DataFrame constructor
325
  results_table = gr.DataFrame(label="Questions and Agent Answers", wrap=True)
326
 
327
+ # # 1) First handler: register the user/run event, skip the queue so it happens immediately
 
 
 
 
 
 
 
 
 
 
328
  # run_button.click(
329
+ # fn=lambda: None, # no-op or a quick “start” callback
330
+ # inputs=[],
331
+ # outputs=[],
332
+ # queue=False
333
+ # ).then(
334
+ # # 2) Second handler: your long‐running generator
335
+ # fn=run_and_submit_all, # this function must `yield` (status, table)
336
+ # outputs=[status_output, results_table]
337
  # )
338
+ run_button.click(
339
+ fn=run_and_submit_all,
340
+ outputs=[status_output, results_table],
341
+ )
342
 
343
  if __name__ == "__main__":
344
  print("\n" + "-"*30 + " App Starting " + "-"*30)