fffiloni commited on
Commit
bd181e0
·
1 Parent(s): 6294be6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -92,12 +92,14 @@ with gr.Blocks(css=css) as demo:
92
  load_pdf = gr.Button("Load pdf to langchain")
93
 
94
  chatbot = gr.Chatbot([], elem_id="chatbot").style(height=350)
95
- with gr.Row():
96
- question = gr.Textbox(label="Question", placeholder="Type your question and hit Enter ")
97
  load_pdf.click(loading_pdf, None, langchain_status, queue=False)
98
  load_pdf.click(pdf_changes, inputs=[pdf_doc, openai_key], outputs=[langchain_status], queue=False)
99
  question.submit(add_text, [chatbot, question], [chatbot, question]).then(
100
  bot, chatbot, chatbot
101
  )
 
 
102
 
103
  demo.launch()
 
92
  load_pdf = gr.Button("Load pdf to langchain")
93
 
94
  chatbot = gr.Chatbot([], elem_id="chatbot").style(height=350)
95
+ question = gr.Textbox(label="Question", placeholder="Type your question and hit Enter ")
96
+ submit_btn = gr.Button("Send Messages")
97
  load_pdf.click(loading_pdf, None, langchain_status, queue=False)
98
  load_pdf.click(pdf_changes, inputs=[pdf_doc, openai_key], outputs=[langchain_status], queue=False)
99
  question.submit(add_text, [chatbot, question], [chatbot, question]).then(
100
  bot, chatbot, chatbot
101
  )
102
+ submit_btn.click(add_text, [chatbot, question], [chatbot, question]).then(
103
+ bot, chatbot, chatbot)
104
 
105
  demo.launch()