vsrinivas commited on
Commit
b8dc911
·
verified ·
1 Parent(s): cdb1c55

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -73,10 +73,10 @@ def process_input(query, slider_value):
73
  #####################
74
  query=query
75
  print(f"Query: {query}")
76
- search_words = query.title().split()
77
  # pattern = r"(?=.*\b" + r"\b)(?=.*\b".join(map(re.escape, search_words)) + r"\b)"
78
  pattern = r"(?=.*" + r")(?=.*".join(map(re.escape, search_words)) + r")"
79
- filtered_items = [item for item in item_list if re.search(pattern, item)]
80
  print(f"Filtered items: {filtered_items}")
81
  filtered_df = fashion_df[fashion_df['productDisplayName'].isin(filtered_items)]
82
  #####################
 
73
  #####################
74
  query=query
75
  print(f"Query: {query}")
76
+ search_words = query.lower().split()
77
  # pattern = r"(?=.*\b" + r"\b)(?=.*\b".join(map(re.escape, search_words)) + r"\b)"
78
  pattern = r"(?=.*" + r")(?=.*".join(map(re.escape, search_words)) + r")"
79
+ filtered_items = [item for item in item_list if re.search(pattern, item.lower())]
80
  print(f"Filtered items: {filtered_items}")
81
  filtered_df = fashion_df[fashion_df['productDisplayName'].isin(filtered_items)]
82
  #####################