ppsingh commited on
Commit
7232d29
1 Parent(s): e292b3f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -287,9 +287,12 @@ with gr.Blocks(title="Audit Q&A", css= "style.css", theme=theme,elem_id = "main-
287
  - **This is just a prototype and being tested and worked upon, so its not perfect and may sometimes give irrelevant answers**. If you are not satisfied with the answer, please ask a more specific question or report your feedback to help us improve the system.
288
  """)
289
 
 
 
290
  (textbox
291
  .submit(start_chat, [textbox,chatbot], [textbox,tabs,chatbot],queue = False,api_name = "start_chat_textbox")
292
- .then(chat, [textbox,chatbot, dropdown_sources,dropdown_reports], [chatbot,sources_textbox],concurrency_limit = 8,api_name = "chat_textbox"))
 
293
 
294
  demo.queue()
295
 
 
287
  - **This is just a prototype and being tested and worked upon, so its not perfect and may sometimes give irrelevant answers**. If you are not satisfied with the answer, please ask a more specific question or report your feedback to help us improve the system.
288
  """)
289
 
290
+ # using event listeners
291
+ # https://www.gradio.app/docs/gradio/textbox#event-listeners-arguments
292
  (textbox
293
  .submit(start_chat, [textbox,chatbot], [textbox,tabs,chatbot],queue = False,api_name = "start_chat_textbox")
294
+ .then(chat, [textbox,chatbot, dropdown_sources,dropdown_reports], [chatbot,sources_textbox],concurrency_limit = 8,api_name = "chat_textbox")
295
+ .then(finish_chat, None, [textbox],api_name = "finish_chat_textbox"))
296
 
297
  demo.queue()
298