Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -162,12 +162,12 @@ with gr.Blocks(css=".gradio-container {background-color: Tomato}, footer {visibi
|
|
| 162 |
with gr.Column():
|
| 163 |
md = gr.Markdown("Please Upload the PDF")
|
| 164 |
chat_bot = gr.Chatbot(visible=False)
|
| 165 |
-
msg_txt = gr.Textbox()
|
| 166 |
chat_bu = gr.Button(value='Clear', visible=False)
|
| 167 |
|
| 168 |
file.change(up_file, [file], [txt, doc_bu, md]) #hiding the text
|
| 169 |
doc_bu.click(doc_emb, [txt], [doc_text_state, doc_emb_state, msg_txt, chat_bu, md, chat_bot])
|
| 170 |
-
msg_txt.submit(get_response, [msg_txt, chat_bot,doc_text_state, doc_emb_state], [msg_txt, chat_bot]
|
| 171 |
chat_bu.click(lambda: None, None, chat_bot, queue=False)
|
| 172 |
|
| 173 |
if __name__ == "__main__":
|
|
|
|
| 162 |
with gr.Column():
|
| 163 |
md = gr.Markdown("Please Upload the PDF")
|
| 164 |
chat_bot = gr.Chatbot(visible=False)
|
| 165 |
+
msg_txt = gr.Textbox(visible = False)
|
| 166 |
chat_bu = gr.Button(value='Clear', visible=False)
|
| 167 |
|
| 168 |
file.change(up_file, [file], [txt, doc_bu, md]) #hiding the text
|
| 169 |
doc_bu.click(doc_emb, [txt], [doc_text_state, doc_emb_state, msg_txt, chat_bu, md, chat_bot])
|
| 170 |
+
msg_txt.submit(get_response, [msg_txt, chat_bot,doc_text_state, doc_emb_state], [msg_txt, chat_bot])
|
| 171 |
chat_bu.click(lambda: None, None, chat_bot, queue=False)
|
| 172 |
|
| 173 |
if __name__ == "__main__":
|