SURESHBEEKHANI commited on
Commit
222be2d
·
verified ·
1 Parent(s): 2513d15

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -10
app.py CHANGED
@@ -84,23 +84,21 @@ def generate_analysis(uploaded_file, client):
84
  "role": "user",
85
  "content": [
86
  {"type": "text", "text": """
 
87
  You are an expert nutritionist with advanced image analysis capabilities.
88
- Your task is to analyze the provided image, identify all visible food items, and estimate their calorie content as accurately as possible.
89
-
90
  **Instructions:**
91
- - List each identified food item separately.
92
- - Use known nutritional data to provide accurate calorie estimates.
93
- - Consider portion size, cooking method, and density of food.
94
- - Clearly specify if an item's calorie count is an estimate due to ambiguity.
95
- - Provide the total estimated calorie count for the entire meal.
96
-
97
  **Output Format:**
98
  - Food Item 1: [Name] – Estimated Calories: [value] kcal
99
  - Food Item 2: [Name] – Estimated Calories: [value] kcal
100
  - ...
101
  - **Total Estimated Calories:** [value] kcal
102
-
103
- If the image is unclear or lacks enough details, state the limitations and provide a confidence percentage for the estimation.
104
  """},
105
  {"type": "image_url", "image_url": {"url": image_url}}
106
  ]
 
84
  "role": "user",
85
  "content": [
86
  {"type": "text", "text": """
87
+
88
  You are an expert nutritionist with advanced image analysis capabilities.
89
+ Your task is to analyze the provided image, identify all visible food items, and estimate their calorie content with high accuracy.
 
90
  **Instructions:**
91
+ - Identify and list each food item visible in the image.
92
+ - For each item, estimate the calorie content based on standard nutritional data, considering portion size, cooking method, and food density.
93
+ - Clearly mark any calorie estimate as "approximate" if based on assumptions due to unclear details.
94
+ - Calculate and provide the total estimated calories for the entire meal.
 
 
95
  **Output Format:**
96
  - Food Item 1: [Name] – Estimated Calories: [value] kcal
97
  - Food Item 2: [Name] – Estimated Calories: [value] kcal
98
  - ...
99
  - **Total Estimated Calories:** [value] kcal
100
+ If the image lacks sufficient detail or is unclear, specify the limitations and include your confidence level in the estimate as a percentage.
101
+
102
  """},
103
  {"type": "image_url", "image_url": {"url": image_url}}
104
  ]