Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -118,12 +118,14 @@ async def predict_image_and_nutrition(file: UploadFile = File(...)):
|
|
| 118 |
# nutrition_info = call_llm(llm_client, nutrition_prompt)
|
| 119 |
|
| 120 |
# # Second prompt: Health benefits and tips
|
| 121 |
-
health_benefits_prompt = f"Provide the health benefits and considerations for {prediction}. Additionally, include practical tips for making {prediction} healthier. Keep the response focused on these two aspects only."
|
| 122 |
-
|
|
|
|
|
|
|
| 123 |
|
| 124 |
return {
|
| 125 |
"predicted_label": prediction,
|
| 126 |
-
"
|
| 127 |
# "nutrition_info": nutrition_info
|
| 128 |
}
|
| 129 |
except Exception as e:
|
|
|
|
| 118 |
# nutrition_info = call_llm(llm_client, nutrition_prompt)
|
| 119 |
|
| 120 |
# # Second prompt: Health benefits and tips
|
| 121 |
+
# health_benefits_prompt = f"Provide the health benefits and considerations for {prediction}. Additionally, include practical tips for making {prediction} healthier. Keep the response focused on these two aspects only."
|
| 122 |
+
health_benefits_prompt = f"Provide detailed information about {prediction}, including its origin, common uses, cultural significance, and any interesting facts. Keep the response informative and well-structured."
|
| 123 |
+
|
| 124 |
+
Information = call_llm(llm_client, health_benefits_prompt)
|
| 125 |
|
| 126 |
return {
|
| 127 |
"predicted_label": prediction,
|
| 128 |
+
"Information": Information,
|
| 129 |
# "nutrition_info": nutrition_info
|
| 130 |
}
|
| 131 |
except Exception as e:
|