Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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
|
| 89 |
-
|
| 90 |
**Instructions:**
|
| 91 |
-
-
|
| 92 |
-
-
|
| 93 |
-
-
|
| 94 |
-
-
|
| 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 |
-
|
| 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 |
]
|