Spaces:
Runtime error
Runtime error
clr 14
Browse files
app.py
CHANGED
|
@@ -168,15 +168,13 @@ with gr.Blocks(css=".gradio-container {background-color: Tomato}, footer {visibi
|
|
| 168 |
md = gr.Markdown("Please Upload the PDF")
|
| 169 |
chat_bot = gr.Chatbot(visible=False)
|
| 170 |
msg_txt = gr.Textbox(visible = False)
|
| 171 |
-
# q_bu = gr.Button(value='Erase', visible=False)
|
| 172 |
chat_bu = gr.Button(value='Clear', visible=False)
|
| 173 |
|
| 174 |
file.change(up_file, [file], [txt, doc_bu, md]) #hiding the text
|
| 175 |
-
doc_bu.click(doc_emb, [txt], [doc_text_state, doc_emb_state, msg_txt, chat_bu,
|
| 176 |
msg_txt.submit(get_response, [msg_txt, chat_bot,doc_text_state, doc_emb_state], [chat_bot],queue=False)
|
| 177 |
-
# q_bu.click(lambda: None, None, msg_txt, queue=False)
|
| 178 |
chat_bu.click(lambda: None, None, chat_bot, queue=False)
|
| 179 |
|
| 180 |
if __name__ == "__main__":
|
| 181 |
-
demo.queue().launch()
|
| 182 |
# demo.queue().launch(share=False, server_name='172.22.2.54', server_port=9191)
|
|
|
|
| 168 |
md = gr.Markdown("Please Upload the PDF")
|
| 169 |
chat_bot = gr.Chatbot(visible=False)
|
| 170 |
msg_txt = gr.Textbox(visible = False)
|
|
|
|
| 171 |
chat_bu = gr.Button(value='Clear', visible=False)
|
| 172 |
|
| 173 |
file.change(up_file, [file], [txt, doc_bu, md]) #hiding the text
|
| 174 |
+
doc_bu.click(doc_emb, [txt], [doc_text_state, doc_emb_state, msg_txt, chat_bu, md, chat_bot])
|
| 175 |
msg_txt.submit(get_response, [msg_txt, chat_bot,doc_text_state, doc_emb_state], [chat_bot],queue=False)
|
|
|
|
| 176 |
chat_bu.click(lambda: None, None, chat_bot, queue=False)
|
| 177 |
|
| 178 |
if __name__ == "__main__":
|
| 179 |
+
demo.queue().launch(show_api=False)
|
| 180 |
# demo.queue().launch(share=False, server_name='172.22.2.54', server_port=9191)
|