Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -150,14 +150,8 @@ def generate_response(image_path, question):
|
|
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()
|
163 |
except Exception as e:
|
|
|
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 |
|
|
|
155 |
answer = response.candidates[0].content.parts[0].text
|
156 |
return answer.strip()
|
157 |
except Exception as e:
|