Spaces:
Running
on
T4
Running
on
T4
Update app.py
Browse files
app.py
CHANGED
|
@@ -289,12 +289,18 @@ with gr.Blocks(title="Audit Q&A", css= "style.css", theme=theme,elem_id = "main-
|
|
| 289 |
- **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.
|
| 290 |
""")
|
| 291 |
|
| 292 |
-
# using event listeners
|
| 293 |
# https://www.gradio.app/docs/gradio/textbox#event-listeners-arguments
|
| 294 |
(textbox
|
| 295 |
.submit(start_chat, [textbox,chatbot], [textbox,tabs,chatbot],queue = False,api_name = "start_chat_textbox")
|
| 296 |
.then(chat, [textbox,chatbot, dropdown_sources,dropdown_reports], [chatbot,sources_textbox],concurrency_limit = 8,api_name = "chat_textbox")
|
| 297 |
.then(finish_chat, None, [textbox],api_name = "finish_chat_textbox"))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 298 |
|
| 299 |
demo.queue()
|
| 300 |
|
|
|
|
| 289 |
- **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.
|
| 290 |
""")
|
| 291 |
|
| 292 |
+
# using event listeners for 1. query box 2. click on example question
|
| 293 |
# https://www.gradio.app/docs/gradio/textbox#event-listeners-arguments
|
| 294 |
(textbox
|
| 295 |
.submit(start_chat, [textbox,chatbot], [textbox,tabs,chatbot],queue = False,api_name = "start_chat_textbox")
|
| 296 |
.then(chat, [textbox,chatbot, dropdown_sources,dropdown_reports], [chatbot,sources_textbox],concurrency_limit = 8,api_name = "chat_textbox")
|
| 297 |
.then(finish_chat, None, [textbox],api_name = "finish_chat_textbox"))
|
| 298 |
+
|
| 299 |
+
(examples_hidden
|
| 300 |
+
.change(start_chat, [examples_hidden,chatbot], [textbox,tabs,chatbot],queue = False,api_name = "start_chat_examples")
|
| 301 |
+
.then(chat, [examples_hidden,chatbot, dropdown_sources,dropdown_reports], [chatbot,sources_textbox],concurrency_limit = 8,api_name = "chat_examples")
|
| 302 |
+
.then(finish_chat, None, [textbox],api_name = "finish_chat_examples")
|
| 303 |
+
)
|
| 304 |
|
| 305 |
demo.queue()
|
| 306 |
|