Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -67,30 +67,16 @@ model = AutoModelForSequenceClassification.from_pretrained(model_name)
|
|
67 |
tokenizer = AutoTokenizer.from_pretrained(model_name, use_fast=False)
|
68 |
|
69 |
LABELS = [
|
70 |
-
"blame shifting",
|
71 |
-
"
|
72 |
-
"control",
|
73 |
-
"dismissiveness",
|
74 |
-
"gaslighting",
|
75 |
-
"guilt tripping",
|
76 |
-
"insults",
|
77 |
-
"obscure language",
|
78 |
-
"projection",
|
79 |
-
"recovery phase",
|
80 |
-
"threat"
|
81 |
-
"deflection"
|
82 |
-
"aggression"
|
83 |
-
"coercion"
|
84 |
-
|
85 |
]
|
86 |
|
87 |
THRESHOLDS = {
|
88 |
-
"recovery
|
89 |
"control": 0.100,
|
90 |
"gaslighting": 0.410,
|
91 |
"dismissiveness": 0.867,
|
92 |
"blame shifting": 0.116,
|
93 |
-
"contradictory statements": 0.100,
|
94 |
"coercion": 0.100,
|
95 |
"aggression": 0.100,
|
96 |
"nonabusive": 0.100,
|
@@ -98,17 +84,19 @@ THRESHOLDS = {
|
|
98 |
"projection": 0.100,
|
99 |
"insults": 0.100
|
100 |
}
|
|
|
101 |
PATTERN_WEIGHTS = {
|
102 |
-
"gaslighting": 1.
|
103 |
-
"control": 1.
|
104 |
-
"dismissiveness": 0.
|
105 |
-
"blame shifting": 0.
|
106 |
-
"
|
107 |
-
"
|
108 |
-
"
|
109 |
-
"
|
110 |
-
"
|
111 |
-
"
|
|
|
112 |
}
|
113 |
RISK_STAGE_LABELS = {
|
114 |
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", "control", "gaslighting", "dismissiveness", "blame shifting",
|
71 |
+
"coercion", "aggression", "nonabusive", "deflection", "projection", "insults"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
72 |
]
|
73 |
|
74 |
THRESHOLDS = {
|
75 |
+
"recovery": 0.622,
|
76 |
"control": 0.100,
|
77 |
"gaslighting": 0.410,
|
78 |
"dismissiveness": 0.867,
|
79 |
"blame shifting": 0.116,
|
|
|
80 |
"coercion": 0.100,
|
81 |
"aggression": 0.100,
|
82 |
"nonabusive": 0.100,
|
|
|
84 |
"projection": 0.100,
|
85 |
"insults": 0.100
|
86 |
}
|
87 |
+
|
88 |
PATTERN_WEIGHTS = {
|
89 |
+
"gaslighting": 1.5,
|
90 |
+
"control": 1.2,
|
91 |
+
"dismissiveness": 0.7,
|
92 |
+
"blame shifting": 0.5,
|
93 |
+
"insults": 1.4,
|
94 |
+
"projection": 1.2,
|
95 |
+
"recovery": 1.1,
|
96 |
+
"coercion": 1.3,
|
97 |
+
"aggression": 1.4,
|
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.",
|