shivanis14
commited on
Commit
•
c536109
1
Parent(s):
cccb237
Update app.py
Browse files
app.py
CHANGED
@@ -386,7 +386,7 @@ def analyze_product(product_info_raw, system_prompt):
|
|
386 |
processing_level = analyze_processing_level(ingredients_list, brand_name, product_name, assistant1.id) if ingredients_list else ""
|
387 |
harmful_ingredient_analysis = analyze_harmful_ingredients(ingredients_list, brand_name, product_name, assistant2.id) if ingredients_list else ""
|
388 |
if len(claims_list) > 0:
|
389 |
-
claims_analysis = analyze_claims(claims_list, ingredients_list, assistant3.id) if claims_list else ""
|
390 |
|
391 |
final_analysis = generate_final_analysis(brand_name,product_name,processing_level,harmful_ingredient_analysis,claims_analysis, system_prompt)
|
392 |
return final_analysis
|
@@ -561,7 +561,7 @@ class ChatManager:
|
|
561 |
if similar_products:
|
562 |
st.session_state.similar_products = similar_products
|
563 |
st.session_state.awaiting_selection = True
|
564 |
-
return "Here are some similar products. Please select:"
|
565 |
return "Product not found in our database. Please provide the image URL of the product."
|
566 |
|
567 |
@staticmethod
|
|
|
386 |
processing_level = analyze_processing_level(ingredients_list, brand_name, product_name, assistant1.id) if ingredients_list else ""
|
387 |
harmful_ingredient_analysis = analyze_harmful_ingredients(ingredients_list, brand_name, product_name, assistant2.id) if ingredients_list else ""
|
388 |
if len(claims_list) > 0:
|
389 |
+
claims_analysis = analyze_claims(claims_list, ingredients_list, product_name, assistant3.id) if claims_list else ""
|
390 |
|
391 |
final_analysis = generate_final_analysis(brand_name,product_name,processing_level,harmful_ingredient_analysis,claims_analysis, system_prompt)
|
392 |
return final_analysis
|
|
|
561 |
if similar_products:
|
562 |
st.session_state.similar_products = similar_products
|
563 |
st.session_state.awaiting_selection = True
|
564 |
+
return "Here are some similar products form our database. Please select:"
|
565 |
return "Product not found in our database. Please provide the image URL of the product."
|
566 |
|
567 |
@staticmethod
|