1MR commited on
Commit
f817e2f
·
verified ·
1 Parent(s): 8e98de4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
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
- health_benefits_and_tips = call_llm(llm_client, health_benefits_prompt)
 
 
123
 
124
  return {
125
  "predicted_label": prediction,
126
- "health_benefits_and_tips": health_benefits_and_tips,
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: