Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -64,11 +64,9 @@ def get_emotional_tone_tag(emotion_profile, patterns, text_lower):
|
|
64 |
fear = emotion_profile.get("fear", 0)
|
65 |
surprise = emotion_profile.get("surprise", 0)
|
66 |
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
+ if "support" in text_lower or "hope" in text_lower or "grace" in text_lower:
|
71 |
-
+ return "supportive"
|
72 |
if (
|
73 |
sadness > 0.4 and
|
74 |
any(p in patterns for p in ["blame shifting", "guilt tripping", "recovery phase"])
|
|
|
64 |
fear = emotion_profile.get("fear", 0)
|
65 |
surprise = emotion_profile.get("surprise", 0)
|
66 |
|
67 |
+
def get_emotional_tone_tag(emotion_profile, patterns, text_lower):
|
68 |
+
if "support" in text_lower or "hope" in text_lower or "grace" in text_lower:
|
69 |
+
return "supportive"
|
|
|
|
|
70 |
if (
|
71 |
sadness > 0.4 and
|
72 |
any(p in patterns for p in ["blame shifting", "guilt tripping", "recovery phase"])
|