File size: 648 Bytes
b8ee30d
 
e6546b7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b8ee30d
 
 
e6546b7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import gradio as gr

def respond_to_user(message):
    responses = [
        "I'm here for you. Tell me more about what's on your mind.",
        "It's okay to feel this way. How can I support you?",
        "I'm listening. What's troubling you?",
        "Take a deep breath. I'm here with you.",
    ]
    return responses[len(message) % len(responses)]

chatbot_interface = gr.Interface(
    fn=respond_to_user,
    inputs="text",
    outputs="text",
    title="Teen Anxiety Relief Chatbot",
    description="A friendly chatbot to help relieve anxiety among teens.",
    theme="dark"
)

if __name__ == "__main__":
    chatbot_interface.launch()