Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -219,18 +219,20 @@ def get_emotional_tone_tag(text, sentiment, patterns, abuse_score):
|
|
219 |
future_consequences = [
|
220 |
"will end up", "you'll be", "you will be", "going to be",
|
221 |
"will become", "will find yourself", "will realize",
|
222 |
-
"you'll regret", "you'll see", "will learn"
|
|
|
223 |
]
|
224 |
dismissive_endings = [
|
225 |
"i'm out", "i'm done", "whatever", "good luck",
|
226 |
-
"your choice", "your problem", "regardless"
|
|
|
227 |
]
|
228 |
|
229 |
if (
|
230 |
-
any(phrase in text_lower for phrase in future_consequences)
|
231 |
-
(any(p in patterns for p in ["dismissiveness", "control"]) or
|
232 |
any(end in text_lower for end in dismissive_endings)) and
|
233 |
-
(
|
|
|
234 |
):
|
235 |
return "predictive punishment"
|
236 |
|
|
|
219 |
future_consequences = [
|
220 |
"will end up", "you'll be", "you will be", "going to be",
|
221 |
"will become", "will find yourself", "will realize",
|
222 |
+
"you'll regret", "you'll see", "will learn", "truly will",
|
223 |
+
"end up alone", "end up miserable"
|
224 |
]
|
225 |
dismissive_endings = [
|
226 |
"i'm out", "i'm done", "whatever", "good luck",
|
227 |
+
"your choice", "your problem", "regardless",
|
228 |
+
"keep", "keep on"
|
229 |
]
|
230 |
|
231 |
if (
|
232 |
+
(any(phrase in text_lower for phrase in future_consequences) or
|
|
|
233 |
any(end in text_lower for end in dismissive_endings)) and
|
234 |
+
any(p in ["dismissiveness", "control"] for p in patterns) and
|
235 |
+
(disgust > 0.2 or neutral > 0.3 or anger > 0.2) # Lowered thresholds
|
236 |
):
|
237 |
return "predictive punishment"
|
238 |
|