Nechba commited on
Commit
a4eea9d
·
verified ·
1 Parent(s): 82fd62e

Update utils.py

Browse files
Files changed (1) hide show
  1. utils.py +4 -4
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
- response = client.models.generate_content(
106
- model="gemini-2.0-flash",
107
- contents=contents
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