SamanthaStorm commited on
Commit
17471e5
Β·
verified Β·
1 Parent(s): 62f3f0c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +21 -23
app.py CHANGED
@@ -67,36 +67,34 @@ 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.999,
76
- "control": 0.100,
77
- "gaslighting": 0.410,
78
- "dismissiveness": 0.867,
79
- "blame shifting": 0.116,
80
- "coercion": 0.100,
81
- "aggression": 0.02,
82
- "nonabusive": 0.100,
83
- "deflection": 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": 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", "control", "gaslighting", "guilt tripping", "dismissiveness", "blame shifting",
71
+ "nonabusive","projection", "insults", "contradictory statements", "obscure language"
72
  ]
73
 
74
  THRESHOLDS = {
75
+ "recovery": 0.25,
76
+ "control": 0.18,
77
+ "gaslighting": 0.50,
78
+ "guilt tripping": .38,
79
+ "dismissiveness": 0.15,
80
+ "blame shifting": 0.28,
81
+ "projection": 0.35,
82
+ "insults": 0.23,
83
+ "contradictory statements": 0.23,
84
+ "obscure language": 0.15
 
85
  }
86
 
87
  PATTERN_WEIGHTS = {
88
+ "recovery": 0.7,
89
+ "control": 1.4,
90
+ "gaslighting": 1.50,
91
+ "guilt tripping": 1.2,
92
+ "dismissiveness": 0.9,
93
+ "blame shifting": 0.8,
94
+ "projection": 0.8,
95
  "insults": 1.4,
96
+ "contradictory statements": 1.0,
97
+ "obscure language": 0.9
 
 
 
 
98
  }
99
  RISK_STAGE_LABELS = {
100
  1: "πŸŒ€ Risk Stage: Tension-Building\nThis message reflects rising emotional pressure or subtle control attempts.",