Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -72,6 +72,7 @@ def hybrid_scale(dense, sparse, alpha):
|
|
72 |
|
73 |
def process_input(query, slider_value):
|
74 |
#####################
|
|
|
75 |
search_words = query.title().split()
|
76 |
pattern = r"(?=.*\b" + r"\b)(?=.*\b".join(map(re.escape, search_words)) + r"\b)"
|
77 |
filtered_items = [item for item in item_list if re.search(pattern, item)]
|
@@ -107,7 +108,7 @@ def process_input(query, slider_value):
|
|
107 |
print(f"Exact match: {exact_match}")
|
108 |
exact_img = filtered_df.loc[filtered_df['productDisplayName']==query, 'image'].iat[0]
|
109 |
|
110 |
-
if exact_match
|
111 |
imgs.insert(0, exact_img)
|
112 |
matches.insert(0, exact_match)
|
113 |
##########
|
|
|
72 |
|
73 |
def process_input(query, slider_value):
|
74 |
#####################
|
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 |
filtered_items = [item for item in item_list if re.search(pattern, item)]
|
|
|
108 |
print(f"Exact match: {exact_match}")
|
109 |
exact_img = filtered_df.loc[filtered_df['productDisplayName']==query, 'image'].iat[0]
|
110 |
|
111 |
+
if exact_match:
|
112 |
imgs.insert(0, exact_img)
|
113 |
matches.insert(0, exact_match)
|
114 |
##########
|