Spaces:
Runtime error
Runtime error
ramwar
commited on
Commit
·
513b7bc
1
Parent(s):
f741b3b
latest version
Browse files
app.py
CHANGED
|
@@ -95,13 +95,14 @@ with gr.Blocks() as demo:
|
|
| 95 |
clear_button = gr.Button("Clear conversation")
|
| 96 |
chatbot = gr.Chatbot(label="Conversation")
|
| 97 |
|
| 98 |
-
textfile.change(fn=upload_file, inputs=[textfile], outputs=[])
|
| 99 |
ask_button.click(
|
| 100 |
fn=ask_question,
|
| 101 |
inputs=[ask_textbox, chatbot],
|
| 102 |
-
outputs=[ask_textbox, chatbot]
|
|
|
|
| 103 |
)
|
| 104 |
-
clear_button.click(lambda: None, None, chatbot, queue=False)
|
| 105 |
|
| 106 |
demo.launch()
|
| 107 |
|
|
|
|
| 95 |
clear_button = gr.Button("Clear conversation")
|
| 96 |
chatbot = gr.Chatbot(label="Conversation")
|
| 97 |
|
| 98 |
+
textfile.change(fn=upload_file, inputs=[textfile], outputs=[], api_name="book_upload")
|
| 99 |
ask_button.click(
|
| 100 |
fn=ask_question,
|
| 101 |
inputs=[ask_textbox, chatbot],
|
| 102 |
+
outputs=[ask_textbox, chatbot],
|
| 103 |
+
api_name="ask_book"
|
| 104 |
)
|
| 105 |
+
clear_button.click(lambda: None, None, chatbot, queue=False, api_name="reset_conversation")
|
| 106 |
|
| 107 |
demo.launch()
|
| 108 |
|