Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -225,6 +225,14 @@ def get_emotional_tone_tag(emotions, sentiment, patterns, abuse_score):
|
|
225 |
sentiment == "undermining"
|
226 |
):
|
227 |
return "toxic resignation"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
228 |
|
229 |
return None
|
230 |
def detect_contradiction(message):
|
|
|
225 |
sentiment == "undermining"
|
226 |
):
|
227 |
return "toxic resignation"
|
228 |
+
if (
|
229 |
+
aggression > 0.1 and anger > 0.5:
|
230 |
+
return "aggressive"
|
231 |
+
)
|
232 |
+
if (
|
233 |
+
deflection > 0.1 or projection > 0.1) and (0.2 < anger <0.7 or 0.2< disgust < 0.7):
|
234 |
+
return "deflective"
|
235 |
+
)
|
236 |
|
237 |
return None
|
238 |
def detect_contradiction(message):
|