SamanthaStorm commited on
Commit
e61295b
·
verified ·
1 Parent(s): cbf97da

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +41 -1
app.py CHANGED
@@ -45,10 +45,50 @@ patterns = [
45
  "follow_up_cop": "Has there ever been a time where the presence of those weapons made you feel unsafe or changed how you responded in an argument?",
46
  "insight": "Unsafely stored or emotionally charged weapon presence can signal power imbalances, intimidation, and elevated risk of harm — especially when one partner is uncomfortable but compliance continues.",
47
  "escalation": "High"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
48
  }
49
  ]
50
 
51
- # Detection function
52
  def analyze_input(text, role):
53
  role_key = "therapist" if role == "Therapist" else "cop"
54
  input_text = text.lower()
 
45
  "follow_up_cop": "Has there ever been a time where the presence of those weapons made you feel unsafe or changed how you responded in an argument?",
46
  "insight": "Unsafely stored or emotionally charged weapon presence can signal power imbalances, intimidation, and elevated risk of harm — especially when one partner is uncomfortable but compliance continues.",
47
  "escalation": "High"
48
+ },
49
+ {
50
+ "id": "digital_control_001",
51
+ "name": "Digital Control via Shared or Monitored Social Media",
52
+ "trigger_keywords": [
53
+ "we have a joint facebook", "shared account", "they manage our social media",
54
+ "he doesn’t let me post", "i’m not allowed on social media", "we don’t really use social media"
55
+ ],
56
+ "concern": "Digital surveillance or identity suppression",
57
+ "follow_up_therapist": "Was the joint account something you both wanted — or more their idea?",
58
+ "follow_up_cop": "Have you ever felt like you couldn’t use social media freely or had to get permission before posting?",
59
+ "insight": "Joint or controlled online accounts often signal deeper patterns of digital surveillance, identity suppression, or reputational control.",
60
+ "escalation": "Moderate"
61
+ },
62
+ {
63
+ "id": "fawning_behavior_001",
64
+ "name": "Hyper-Attunement to Partner’s Preferences",
65
+ "trigger_keywords": [
66
+ "he doesn’t like when i", "she prefers i don’t", "i try not to upset them",
67
+ "he’d hate that", "i just avoid it", "he gets upset when"
68
+ ],
69
+ "concern": "Chronic fear-based adjustment or internalized control",
70
+ "follow_up_therapist": "What do you think would happen if you did it anyway?",
71
+ "follow_up_cop": "Have you ever changed plans or avoided doing something because you didn’t want to upset them?",
72
+ "insight": "Hyper-attunement to a partner’s preferences often reveals chronic behavioral conditioning rooted in fear, not genuine compromise.",
73
+ "escalation": "Moderate"
74
+ },
75
+ {
76
+ "id": "minimizing_behavior_001",
77
+ "name": "Minimizing or Defending the Abuser’s Behavior",
78
+ "trigger_keywords": [
79
+ "he’s not abusive", "she didn’t mean to", "he just has a temper",
80
+ "it’s not that bad", "he was just drunk", "she had a rough childhood",
81
+ "it’s not like he hits me"
82
+ ],
83
+ "concern": "Normalization or justification of harm",
84
+ "follow_up_therapist": "It sounds like you’re trying to make sense of their behavior — what part of you still feels unsure about how to name it?",
85
+ "follow_up_cop": "Have you ever felt scared even if they didn’t physically hurt you?",
86
+ "insight": "Minimizing or justifying harm without prompting signals grooming, normalization, or an internalized need to protect the abuser’s image.",
87
+ "escalation": "High"
88
  }
89
  ]
90
 
91
+ # Analysis function
92
  def analyze_input(text, role):
93
  role_key = "therapist" if role == "Therapist" else "cop"
94
  input_text = text.lower()