Sw1ft0 commited on
Commit
8d3574a
·
1 Parent(s): 62f3a56

Update Gradio UI: add title, Send and Copy buttons and change chat window's size

Browse files
Files changed (1) hide show
  1. app.py +7 -1
app.py CHANGED
@@ -204,8 +204,13 @@ Rules:
204
 
205
  # 5. Gradio UI
206
  with gr.Blocks() as demo:
207
- chatbot = gr.Chatbot()
 
 
 
 
208
  msg = gr.Textbox(placeholder="Ask me a question about the reports...")
 
209
  clear = gr.ClearButton([msg, chatbot])
210
 
211
  def respond(message, chat_history):
@@ -214,6 +219,7 @@ with gr.Blocks() as demo:
214
  return "", chat_history
215
 
216
  msg.submit(respond, [msg, chatbot], [msg, chatbot])
 
217
 
218
  # 6. Run locally (Spaces will call demo.launch() automatically)
219
  if __name__ == "__main__":
 
204
 
205
  # 5. Gradio UI
206
  with gr.Blocks() as demo:
207
+ gr.Markdown("""
208
+ # 🏨 Excel Hotel Data Chatbot
209
+ Ask any question about the two provided Excel reports. The assistant will analyze the hotel data and answer using the loaded sheets.
210
+ """)
211
+ chatbot = gr.Chatbot(height=500, show_copy_button=True)
212
  msg = gr.Textbox(placeholder="Ask me a question about the reports...")
213
+ send_btn = gr.Button("Send")
214
  clear = gr.ClearButton([msg, chatbot])
215
 
216
  def respond(message, chat_history):
 
219
  return "", chat_history
220
 
221
  msg.submit(respond, [msg, chatbot], [msg, chatbot])
222
+ send_btn.click(respond, [msg, chatbot], [msg, chatbot])
223
 
224
  # 6. Run locally (Spaces will call demo.launch() automatically)
225
  if __name__ == "__main__":