DoNotChoke commited on
Commit
d499824
·
verified ·
1 Parent(s): 73bdb54

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -4
app.py CHANGED
@@ -70,13 +70,26 @@ def respond(message, history):
70
  print(f"[DEBUG] {str(e)}")
71
  return "Sorry, I encountered an error processing your request"
72
 
73
- with gr.Blocks(theme=gr.themes.Soft()) as demo:
74
  gr.Markdown("# 🌦️ Weather Assistant")
75
  gr.Markdown("Enter any location to check weather conditions")
76
- chatbot = gr.ChatInterface(
 
 
 
 
 
 
 
 
 
 
77
  respond,
78
- title="Weather Query",
79
- submit_btn="Submit",
 
 
 
80
  )
81
 
82
  if __name__ == "__main__":
 
70
  print(f"[DEBUG] {str(e)}")
71
  return "Sorry, I encountered an error processing your request"
72
 
73
+ with gr.Blocks(theme=gr.themes.Soft(), css="styles.css") as demo:
74
  gr.Markdown("# 🌦️ Weather Assistant")
75
  gr.Markdown("Enter any location to check weather conditions")
76
+
77
+ chatbot = gr.Chatbot(
78
+ elem_classes=["chatbot"],
79
+ avatar_images=(
80
+ "avatars/user-avatar.png",
81
+ "avatars/bot-avatar.png"
82
+ )
83
+ )
84
+
85
+ # Giao diện chat
86
+ chat_interface = gr.ChatInterface(
87
  respond,
88
+ chatbot=chatbot,
89
+ additional_inputs=None,
90
+ submit_btn=gr.Button("Submit", variant="primary"),
91
+ clear_btn=gr.Button("Clear History", variant="secondary"),
92
+
93
  )
94
 
95
  if __name__ == "__main__":