shivanis14
commited on
Commit
•
a51bb26
1
Parent(s):
0c1c9f5
Update app.py
Browse files
app.py
CHANGED
@@ -409,8 +409,11 @@ def chatbot_response(image_urls_str, product_name_by_user, data_extractor_url, s
|
|
409 |
if similar_product_list_json and extract_info == False:
|
410 |
with st.spinner("Fetching product information from our database... This may take a moment."):
|
411 |
print(f"similar_product_list_json : {similar_product_list_json}")
|
412 |
-
|
413 |
-
|
|
|
|
|
|
|
414 |
|
415 |
elif extract_info == True:
|
416 |
with st.spinner("Analyzing the product... This may take a moment."):
|
|
|
409 |
if similar_product_list_json and extract_info == False:
|
410 |
with st.spinner("Fetching product information from our database... This may take a moment."):
|
411 |
print(f"similar_product_list_json : {similar_product_list_json}")
|
412 |
+
if 'error' not in similar_product_list_json.keys():
|
413 |
+
similar_product_list = similar_product_list_json['products']
|
414 |
+
return similar_product_list, "Product list found from our database"
|
415 |
+
else:
|
416 |
+
return [], "Product list not found"
|
417 |
|
418 |
elif extract_info == True:
|
419 |
with st.spinner("Analyzing the product... This may take a moment."):
|