Spaces:
Sleeping
Sleeping
Update model.py
Browse files
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 ===
|