fffiloni commited on
Commit
0cc73a7
1 Parent(s): fd536a5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
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
- with gr.Row():
70
- question = gr.Textbox(label="Question", placeholder="Type your question and hit Enter ")
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()