Update app.py
Browse files
app.py
CHANGED
@@ -43,7 +43,7 @@ async def analyze_food_image(
|
|
43 |
img = Image.open(io.BytesIO(image_bytes))
|
44 |
|
45 |
# Load the generative model
|
46 |
-
model = genai.GenerativeModel("gemini-
|
47 |
|
48 |
# Define prompts based on analysis type
|
49 |
prompts = {
|
@@ -245,7 +245,7 @@ async def analyze_food_image_original(file: UploadFile = File()):
|
|
245 |
img = Image.open(io.BytesIO(image_bytes))
|
246 |
|
247 |
# Load the generative model
|
248 |
-
model = genai.GenerativeModel("gemini-
|
249 |
|
250 |
# Updated structured JSON prompt
|
251 |
prompt = """
|
|
|
43 |
img = Image.open(io.BytesIO(image_bytes))
|
44 |
|
45 |
# Load the generative model
|
46 |
+
model = genai.GenerativeModel("gemini-2.0-flash") # Optimized for real-time image processing
|
47 |
|
48 |
# Define prompts based on analysis type
|
49 |
prompts = {
|
|
|
245 |
img = Image.open(io.BytesIO(image_bytes))
|
246 |
|
247 |
# Load the generative model
|
248 |
+
model = genai.GenerativeModel("gemini-2.0-flash") # Optimized for real-time image processing
|
249 |
|
250 |
# Updated structured JSON prompt
|
251 |
prompt = """
|