Spaces:
Sleeping
Sleeping
Upload 3 files
Browse files
app.py
CHANGED
|
@@ -95,9 +95,9 @@ harmful_response = (
|
|
| 95 |
|
| 96 |
# Simplified emotions dictionary
|
| 97 |
emotions = {
|
| 98 |
-
"sad": "
|
| 99 |
-
"anxiety": "
|
| 100 |
-
"angry": "
|
| 101 |
"lonely": "You are not alone. Talking helps — I’m here to listen.",
|
| 102 |
"rejected": "Rejection hurts but it doesn’t define your worth.",
|
| 103 |
"exams": "Plan short sessions with breaks. You can do this!",
|
|
@@ -464,6 +464,7 @@ with gr.Blocks() as app:
|
|
| 464 |
bot_reply = gr.Textbox(label="🧠 Therapist")
|
| 465 |
voice = gr.Audio(label="🔊 Voice Reply")
|
| 466 |
send.click(chat_function, [audio_input, text_input], [bot_reply, voice])
|
|
|
|
| 467 |
|
| 468 |
with gr.Tab("4️⃣ Chat History"):
|
| 469 |
show_history = gr.Button("📜 Show Chats")
|
|
|
|
| 95 |
|
| 96 |
# Simplified emotions dictionary
|
| 97 |
emotions = {
|
| 98 |
+
"sad": "I hear you 💙. I’m really sorry you’re feeling sad right now.Do you want to tell me what’s making you feel this way, or would you rather I just try to gently cheer you up?Here are a few small things that sometimes help when sadness feels heavy:🌬️ Take 3 deep, slow breaths — it really calms the body.✍️ Write down what you’re feeling in a notebook (or even here with me). Sometimes just letting it out helps.🎧 Put on a calming or favorite song — music can shift your mood more than we realize.🌳 Step outside for 5 minutes and notice something simple in nature, like the sky, trees, or birds.💡 You don’t have to fight sadness alone — it’s okay to feel it and also okay to lean on others when it’s too much.",
|
| 99 |
+
"anxiety": "It’s okay — anxiety can feel overwhelming, like your mind is running a race it didn’t sign up for.Try slowing down your breathing: inhale for 4 seconds, hold for 4, exhale for 6.Your thoughts are not facts — they’re just passing clouds, and you are the sky.",
|
| 100 |
+
"angry": "It’s normal to feel angry — it’s your mind’s way of telling you something feels unfair or hurtful.Before reacting, give yourself space: take a deep breath, unclench your jaw, and let your shoulders drop.Once you feel calmer, you can decide how to express your feelings in a way that helps, not hurts.",
|
| 101 |
"lonely": "You are not alone. Talking helps — I’m here to listen.",
|
| 102 |
"rejected": "Rejection hurts but it doesn’t define your worth.",
|
| 103 |
"exams": "Plan short sessions with breaks. You can do this!",
|
|
|
|
| 464 |
bot_reply = gr.Textbox(label="🧠 Therapist")
|
| 465 |
voice = gr.Audio(label="🔊 Voice Reply")
|
| 466 |
send.click(chat_function, [audio_input, text_input], [bot_reply, voice])
|
| 467 |
+
|
| 468 |
|
| 469 |
with gr.Tab("4️⃣ Chat History"):
|
| 470 |
show_history = gr.Button("📜 Show Chats")
|