aditijuluri commited on
Commit
fc74aa3
·
verified ·
1 Parent(s): c13613d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -5
app.py CHANGED
@@ -78,9 +78,11 @@ def respond(message, history):
78
 
79
  return response['choices'][0]['message']['content'].strip()
80
 
81
- # Initial chatbot message
82
- initial_message = [("🤖", "Hey! I’m your Gen-Z watch buddy.\nI help you find your next favorite TV show based on what you like, your age, or your favorite genre. Just tell me what you're into!")]
83
 
84
- # Launch Gradio interface with initial message
85
- chatbot = gr.ChatInterface(respond, type="messages", chatbot=initial_message)
86
- chatbot.launch()
 
 
 
78
 
79
  return response['choices'][0]['message']['content'].strip()
80
 
81
+ # Create a Chatbot component with an initial message
82
+ chatbot_ui = gr.Chatbot(value=[("🤖", "Hey! I’m your Gen-Z watch buddy.\nI help you find your next favorite TV show based on what you like, your age, or your favorite genre. Just tell me what you're into!")])
83
 
84
+ # Create the ChatInterface using the custom chatbot component
85
+ chat_interface = gr.ChatInterface(fn=respond, chatbot=chatbot_ui, type="messages")
86
+
87
+ # Launch it
88
+ chat_interface.launch()