1MR commited on
Commit
96a60dc
·
verified ·
1 Parent(s): 871f16e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -116,13 +116,13 @@ async def predict_image_and_nutrition(file: UploadFile = File(...)):
116
  nutrition_prompt = f"Provide the nutrition information (Calories, Protein, Carbohydrates, Dietary Fiber, Sugars, Fat, Sodium, Potassium, Vitamin C, Vitamin B6, Folate, Niacin, Pantothenic acid) for {prediction} per 100 grams in a formatted list only."
117
  nutrition_info = call_llm(llm_client, nutrition_prompt)
118
 
119
- # Second prompt: Health benefits and tips
120
- 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."
121
- health_benefits_and_tips = call_llm(llm_client, health_benefits_prompt)
122
 
123
  return {
124
  "predicted_label": prediction,
125
- "health_benefits_and_tips": health_benefits_and_tips,
126
  "nutrition_info": nutrition_info
127
  }
128
  except Exception as e:
 
116
  nutrition_prompt = f"Provide the nutrition information (Calories, Protein, Carbohydrates, Dietary Fiber, Sugars, Fat, Sodium, Potassium, Vitamin C, Vitamin B6, Folate, Niacin, Pantothenic acid) for {prediction} per 100 grams in a formatted list only."
117
  nutrition_info = call_llm(llm_client, nutrition_prompt)
118
 
119
+ # # Second prompt: Health benefits and tips
120
+ # 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."
121
+ # health_benefits_and_tips = call_llm(llm_client, health_benefits_prompt)
122
 
123
  return {
124
  "predicted_label": prediction,
125
+ # "health_benefits_and_tips": health_benefits_and_tips,
126
  "nutrition_info": nutrition_info
127
  }
128
  except Exception as e: