Hasitha16 commited on
Commit
40537d1
·
verified ·
1 Parent(s): 58ae022

Update model.py

Browse files
Files changed (1) hide show
  1. model.py +5 -2
model.py CHANGED
@@ -119,10 +119,13 @@ def assess_churn_risk(sentiment_label, emotion_label):
119
  def extract_pain_points(text):
120
  common_issues = [
121
  "slow", "crash", "lag", "expensive", "confusing", "noisy", "poor", "rude",
122
- "unhelpful", "bug", "broken", "unresponsive", "not working", "error", "delay", "disconnect"
 
 
123
  ]
 
124
  text_lower = text.lower()
125
- matches = [kw for kw in common_issues if re.search(rf"\b{kw}\b", text_lower)]
126
  return list(set(matches))[:5]
127
 
128
  # === Industry Detector ===
 
119
  def extract_pain_points(text):
120
  common_issues = [
121
  "slow", "crash", "lag", "expensive", "confusing", "noisy", "poor", "rude",
122
+ "unhelpful", "bug", "broken", "unresponsive", "not working", "error", "delay", "disconnect",
123
+ "incomplete", "overpriced", "difficult", "conflict", "unclear", "inconsistent",
124
+ "missing", "locked", "freeze", "freeze-up", "conflicting", "conflicting answers", "outdated"
125
  ]
126
+
127
  text_lower = text.lower()
128
+ matches = [kw for kw in common_issues if re.search(rf"\b{re.escape(kw)}\b", text_lower)]
129
  return list(set(matches))[:5]
130
 
131
  # === Industry Detector ===