SamanthaStorm commited on
Commit
623fdc2
·
verified ·
1 Parent(s): 7f5cc04

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -108,7 +108,12 @@ def calculate_darvo_score(patterns, sentiment_before, sentiment_after, motifs_fo
108
  m_hits = len([m for m in motifs_found if any(f.lower() in m.lower() for f in DARVO_MOTIFS)])
109
  m_score = m_hits / len(DARVO_MOTIFS)
110
  c_score = 1.0 if contradiction_flag else 0.0
111
- raw = 0.3*p_score + 0.3*s_shift + 0.25*m_score + 0.15*c_score
 
 
 
 
 
112
  return round(min(raw,1.0),3)
113
 
114
  def generate_risk_snippet(abuse_score, top_label, escalation_score, stage):
 
108
  m_hits = len([m for m in motifs_found if any(f.lower() in m.lower() for f in DARVO_MOTIFS)])
109
  m_score = m_hits / len(DARVO_MOTIFS)
110
  c_score = 1.0 if contradiction_flag else 0.0
111
+ raw = (
112
+ 0.25 * pattern_score
113
+ + 0.30 * sentiment_shift_score
114
+ + 0.35 * motif_score
115
+ + 0.10 * contradiction_score
116
+ )
117
  return round(min(raw,1.0),3)
118
 
119
  def generate_risk_snippet(abuse_score, top_label, escalation_score, stage):