Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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.
|
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()
|