Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -68,7 +68,7 @@ def get_emotion_profile(text):
|
|
68 |
results = results[0]
|
69 |
return {r["label"].lower(): round(r["score"], 3) for r in results}
|
70 |
|
71 |
-
APOLOGY_KEYWORDS = ["sorry", "
|
72 |
|
73 |
# ——— 2) Abuse-Patterns Model ——————————————————————————————————————————————
|
74 |
model_name = "SamanthaStorm/tether-multilabel-v3"
|
@@ -209,11 +209,6 @@ def get_emotional_tone_tag(emotion_profile, patterns, text_lower):
|
|
209 |
and "projection" in patterns:
|
210 |
return "fear-mongering"
|
211 |
|
212 |
-
# 15. Disbelieving Accusation
|
213 |
-
if surprise > 0.3 \
|
214 |
-
and lex_counts["surprise"] > 0 \
|
215 |
-
and "blame shifting" in patterns:
|
216 |
-
return "disbelieving accusation"
|
217 |
|
218 |
# 16. Empathetic Solidarity
|
219 |
if joy > 0.2 and sadness > 0.2 \
|
|
|
68 |
results = results[0]
|
69 |
return {r["label"].lower(): round(r["score"], 3) for r in results}
|
70 |
|
71 |
+
APOLOGY_KEYWORDS = ["sorry", "apology", "forgive"]
|
72 |
|
73 |
# ——— 2) Abuse-Patterns Model ——————————————————————————————————————————————
|
74 |
model_name = "SamanthaStorm/tether-multilabel-v3"
|
|
|
209 |
and "projection" in patterns:
|
210 |
return "fear-mongering"
|
211 |
|
|
|
|
|
|
|
|
|
|
|
212 |
|
213 |
# 16. Empathetic Solidarity
|
214 |
if joy > 0.2 and sadness > 0.2 \
|