Docfile commited on
Commit
3923041
·
verified ·
1 Parent(s): 3156c75

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -2
app.py CHANGED
@@ -148,8 +148,14 @@ def generate_response(image_path, question):
148
  try:
149
  image_data = Image.open(image_path)
150
  response = client.models.generate_content(
151
- model="gemini-2.0-flash",
152
- contents=[image_data, prompt]
 
 
 
 
 
 
153
  )
154
  answer = response.candidates[0].content.parts[0].text
155
  return answer.strip()
 
148
  try:
149
  image_data = Image.open(image_path)
150
  response = client.models.generate_content(
151
+ model="gemini-2.5-flash-preview-04-17",
152
+ contents=[image_data, prompt],
153
+ config=types.GenerateContentConfig(
154
+ thinking_config=types.ThinkingConfig(
155
+ thinking_budget=8000
156
+ )
157
+ )
158
+
159
  )
160
  answer = response.candidates[0].content.parts[0].text
161
  return answer.strip()