madankn79 commited on
Commit
32a64aa
·
1 Parent(s): 5f80bf3
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -34,7 +34,7 @@ model_cache = {}
34
  # Clean text: remove special characters and stop words
35
  def clean_text(input_text):
36
  cleaned = re.sub(r"[^A-Za-z0-9\s]", " ", input_text)
37
- cleaned = re.sub(r"\b[A-Za-z]{2,}[0-9]{3,}\b", "", cleaned_text) # SKU/product code pattern (letters followed by numbers)
38
 
39
  words = cleaned.split()
40
  words = [word for word in words if word.lower() not in stop_words]
 
34
  # Clean text: remove special characters and stop words
35
  def clean_text(input_text):
36
  cleaned = re.sub(r"[^A-Za-z0-9\s]", " ", input_text)
37
+ cleaned = re.sub(r"\b[A-Za-z]{2,}[0-9]{3,}\b", "", cleaned) # SKU/product code pattern (letters followed by numbers)
38
 
39
  words = cleaned.split()
40
  words = [word for word in words if word.lower() not in stop_words]