Spaces:
Sleeping
Sleeping
Update utils.py
Browse files
utils.py
CHANGED
|
@@ -102,10 +102,10 @@ def analyze_pdf_images_with_gemini(pdf_bytes):
|
|
| 102 |
contents.append(types.Part.from_bytes(data=img_bytes, mime_type="image/jpeg"))
|
| 103 |
|
| 104 |
# Generate content using Gemini
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
)
|
| 109 |
|
| 110 |
return response.text
|
| 111 |
|
|
|
|
| 102 |
contents.append(types.Part.from_bytes(data=img_bytes, mime_type="image/jpeg"))
|
| 103 |
|
| 104 |
# Generate content using Gemini
|
| 105 |
+
model = genai.GenerativeModel('gemini-2.0-flash') # Updated model name
|
| 106 |
+
|
| 107 |
+
# Send both the prompt and image to Gemini
|
| 108 |
+
response = model.generate_content(contents)
|
| 109 |
|
| 110 |
return response.text
|
| 111 |
|