Docfile commited on
Commit
9a315df
·
verified ·
1 Parent(s): c51336e

Update app.py

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