1MR commited on
Commit
d673464
·
verified ·
1 Parent(s): 0eb6b6c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -4
app.py CHANGED
@@ -120,13 +120,16 @@ async def predict_image_and_nutrition(file: UploadFile = File(...)):
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
- "nutrition_info": nutrition_info,
129
- "Information": Information
 
130
  }
131
  except Exception as e:
132
  return JSONResponse(
 
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
  Information = call_llm(llm_client, health_benefits_prompt)
124
+
125
+ recipes_prompt=f"Tell me about the two most famous recipes for {prediction}. Include the ingredients only."
126
+ recipes_info=call_llm(llm_client, recipes_prompt)
127
 
128
  return {
129
+ "Predicted_label": prediction,
130
+ "Nutrition_info": nutrition_info,
131
+ "Information": Information,
132
+ "Recipes":recipes_info
133
  }
134
  except Exception as e:
135
  return JSONResponse(