SamanthaStorm commited on
Commit
c10440f
·
verified ·
1 Parent(s): 6a0e04a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -82,8 +82,8 @@ def analyze_messages(input_text, risk_flags):
82
  if not input_text:
83
  return "Please enter a message for analysis."
84
 
85
- motif_tags, matched_phrases = tag_motifs(input_text)
86
- contextual_flags = risk_flags + motif_tags # Combine checkbox and motif flags
87
 
88
  sentiment = custom_sentiment(input_text)
89
  sentiment_label = sentiment['label']
 
82
  if not input_text:
83
  return "Please enter a message for analysis."
84
 
85
+ motif_flags = detect_motifs(input_text)
86
+ risk_flags = list(set(risk_flags + motif_flags)) if risk_flags else motif_flags
87
 
88
  sentiment = custom_sentiment(input_text)
89
  sentiment_label = sentiment['label']