kidwaiaun commited on
Commit
484cd86
·
verified ·
1 Parent(s): a816555

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -158,11 +158,9 @@ with gr.Blocks() as chat_ui:
158
 
159
 
160
  chatbot = gr.Chatbot()
161
- with gr.Row():
162
- with gr.Column(scale=8):
163
- user_input = gr.Textbox(placeholder="Type your message here...", show_label=False)
164
- with gr.Column(scale=2):
165
- send_btn = gr.Button("Send")
166
 
167
  upload_btn.click(process_pdf, inputs=[file_upload], outputs=[status])
168
 
@@ -173,6 +171,7 @@ with gr.Blocks() as chat_ui:
173
  full_response += word
174
  yield chat_history[:-1] + [(user_input, full_response)] # Update last message only
175
  chat_history.append((user_input, full_response))
 
176
 
177
  send_btn.click(stream_response, inputs=[user_input, chatbot], outputs=[chatbot])
178
 
 
158
 
159
 
160
  chatbot = gr.Chatbot()
161
+ with gr.Row(equal_height=True):
162
+ user_input = gr.Textbox(placeholder="Type your message here...", show_label=False, scale=8)
163
+ send_btn = gr.Button("Send", scale=2)
 
 
164
 
165
  upload_btn.click(process_pdf, inputs=[file_upload], outputs=[status])
166
 
 
171
  full_response += word
172
  yield chat_history[:-1] + [(user_input, full_response)] # Update last message only
173
  chat_history.append((user_input, full_response))
174
+ yield chat_history
175
 
176
  send_btn.click(stream_response, inputs=[user_input, chatbot], outputs=[chatbot])
177