Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -66,12 +66,15 @@ with gr.Blocks(css=css) as demo:
|
|
66 |
load_pdf = gr.Button("Load pdf to langchain")
|
67 |
|
68 |
chatbot = gr.Chatbot([], elem_id="chatbot").style(height=350)
|
69 |
-
|
70 |
-
|
71 |
load_pdf.click(loading_pdf, None, langchain_status, queue=False)
|
72 |
load_pdf.click(pdf_changes, pdf_doc, langchain_status, queue=False)
|
73 |
question.submit(add_text, [chatbot, question], [chatbot, question]).then(
|
74 |
bot, chatbot, chatbot
|
75 |
)
|
|
|
|
|
|
|
76 |
|
77 |
demo.launch()
|
|
|
66 |
load_pdf = gr.Button("Load pdf to langchain")
|
67 |
|
68 |
chatbot = gr.Chatbot([], elem_id="chatbot").style(height=350)
|
69 |
+
question = gr.Textbox(label="Question", placeholder="Type your question and hit Enter ")
|
70 |
+
submit_btn = gr.Button("Send message")
|
71 |
load_pdf.click(loading_pdf, None, langchain_status, queue=False)
|
72 |
load_pdf.click(pdf_changes, pdf_doc, langchain_status, queue=False)
|
73 |
question.submit(add_text, [chatbot, question], [chatbot, question]).then(
|
74 |
bot, chatbot, chatbot
|
75 |
)
|
76 |
+
submit_btn.click(add_text, [chatbot, question], [chatbot, question]).then(
|
77 |
+
bot, chatbot, chatbot
|
78 |
+
)
|
79 |
|
80 |
demo.launch()
|