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