SamanthaStorm commited on
Commit
e5fefca
Β·
verified Β·
1 Parent(s): 40b4f30

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -16
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.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 = {
@@ -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.",