Trabis commited on
Commit
700b120
·
verified ·
1 Parent(s): eb98501

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -9
app.py CHANGED
@@ -504,15 +504,8 @@ with gr.Blocks(css=custom_css) as iface:
504
  # )
505
 
506
  def on_submit(question):
507
- # Retourne trois valeurs : réponse, contexte et statut
508
  response, context = process_question(question)
509
-
510
- def generate_response():
511
- yield response
512
- yield context
513
- yield status
514
-
515
- return generate_response()
516
 
517
  submit_btn.click(
518
  fn=on_submit,
@@ -520,7 +513,7 @@ with gr.Blocks(css=custom_css) as iface:
520
  outputs=[answer_box, context_box],
521
  api_name="predict",
522
  queue=True
523
- )
524
 
525
  if __name__ == "__main__":
526
  iface.launch(
 
504
  # )
505
 
506
  def on_submit(question):
 
507
  response, context = process_question(question)
508
+ return response, context
 
 
 
 
 
 
509
 
510
  submit_btn.click(
511
  fn=on_submit,
 
513
  outputs=[answer_box, context_box],
514
  api_name="predict",
515
  queue=True
516
+ )
517
 
518
  if __name__ == "__main__":
519
  iface.launch(