Spaces:
Runtime error
Runtime error
| 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() | |