Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -67,22 +67,21 @@ model = AutoModelForSequenceClassification.from_pretrained(model_name)
|
|
67 |
tokenizer = AutoTokenizer.from_pretrained(model_name, use_fast=False)
|
68 |
|
69 |
LABELS = [
|
70 |
-
"recovery", "control", "gaslighting", "dismissiveness", "blame shifting",
|
71 |
-
"coercion", "aggression", "nonabusive", "deflection", "projection", "insults"
|
72 |
]
|
73 |
|
74 |
THRESHOLDS = {
|
75 |
-
"recovery": 0.
|
76 |
-
"control": 0.
|
77 |
-
"gaslighting": 0.
|
78 |
-
"
|
79 |
-
"
|
80 |
-
"
|
81 |
-
"aggression": 0.02,
|
82 |
"nonabusive": 0.100,
|
83 |
-
"
|
84 |
-
"
|
85 |
-
"
|
|
|
86 |
}
|
87 |
|
88 |
PATTERN_WEIGHTS = {
|
@@ -92,11 +91,11 @@ PATTERN_WEIGHTS = {
|
|
92 |
"blame shifting": 0.5,
|
93 |
"insults": 1.4,
|
94 |
"projection": 1.2,
|
95 |
-
"recovery": 1.1,
|
96 |
-
"coercion": 1.3,
|
97 |
-
"aggression": 2.2,
|
98 |
"nonabusive": 0.1,
|
99 |
-
"deflection": 0.4
|
|
|
|
|
100 |
}
|
101 |
RISK_STAGE_LABELS = {
|
102 |
1: "π Risk Stage: Tension-Building\nThis message reflects rising emotional pressure or subtle control attempts.",
|
|
|
67 |
tokenizer = AutoTokenizer.from_pretrained(model_name, use_fast=False)
|
68 |
|
69 |
LABELS = [
|
70 |
+
"recovery phase", "obscure language", "control", "gaslighting", "dismissiveness", "blame shifting", "nonabusive", "deflection", "projection", "insults", "contradictory statements",
|
|
|
71 |
]
|
72 |
|
73 |
THRESHOLDS = {
|
74 |
+
"recovery phase": 0.25,
|
75 |
+
"control": 0.18,
|
76 |
+
"gaslighting": 0.50,
|
77 |
+
"guilt tripping": .38
|
78 |
+
"dismissiveness": 0.15,
|
79 |
+
"blame shifting": 0.28,
|
|
|
80 |
"nonabusive": 0.100,
|
81 |
+
"projection": 0.35,
|
82 |
+
"insults": 0.23,
|
83 |
+
"contradictory statements": 0.23,
|
84 |
+
"obscure language": 0.15
|
85 |
}
|
86 |
|
87 |
PATTERN_WEIGHTS = {
|
|
|
91 |
"blame shifting": 0.5,
|
92 |
"insults": 1.4,
|
93 |
"projection": 1.2,
|
94 |
+
"recovery phase": 1.1,
|
|
|
|
|
95 |
"nonabusive": 0.1,
|
96 |
+
"deflection": 0.4,
|
97 |
+
"obscure language": 0.9,
|
98 |
+
"guilt tripping": 1.2
|
99 |
}
|
100 |
RISK_STAGE_LABELS = {
|
101 |
1: "π Risk Stage: Tension-Building\nThis message reflects rising emotional pressure or subtle control attempts.",
|