madankn79 commited on
Commit
0506c95
·
1 Parent(s): 94567bf
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -46,13 +46,13 @@ def clean_text(input_text):
46
  cleaned = re.sub(r"[^A-Za-z0-9\s]", " ", input_text)
47
  cleaned = re.sub(r"\b[A-Za-z]{2,}[0-9]{3,}\b", "", cleaned) # SKU/product code pattern (letters followed by numbers)
48
 
49
- words = cleaned.split()
50
- words = [word for word in words if word.lower() not in stop_words]
51
-
52
- # Example keyword list
53
  keywords = ["blazer", "shirt", "trouser", "saree", "tie", "suit"]
 
54
 
55
- words = emphasize_keywords(words, keywords)
 
 
56
 
57
  return " ".join(words).strip()
58
 
 
46
  cleaned = re.sub(r"[^A-Za-z0-9\s]", " ", input_text)
47
  cleaned = re.sub(r"\b[A-Za-z]{2,}[0-9]{3,}\b", "", cleaned) # SKU/product code pattern (letters followed by numbers)
48
 
49
+ # Example keyword list
 
 
 
50
  keywords = ["blazer", "shirt", "trouser", "saree", "tie", "suit"]
51
+ cleaned = emphasize_keywords(cleaned, keywords)
52
 
53
+
54
+ words = cleaned.split()
55
+ words = [word for word in words if word.lower() not in stop_words]
56
 
57
  return " ".join(words).strip()
58