Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -26,13 +26,8 @@ def generate_image(prompt):
|
|
| 26 |
|
| 27 |
response = client.models.generate_content(
|
| 28 |
model="gemini-2.5-flash-image-preview",
|
| 29 |
-
contents=prompt,
|
| 30 |
-
|
| 31 |
-
.GenerateContentConfig(
|
| 32 |
-
response_modalities=['TEXT', 'IMAGE']
|
| 33 |
-
)
|
| 34 |
-
)
|
| 35 |
-
|
| 36 |
for part in response.candidates[0].content.parts:
|
| 37 |
if part.text is not None:
|
| 38 |
pass
|
|
|
|
| 26 |
|
| 27 |
response = client.models.generate_content(
|
| 28 |
model="gemini-2.5-flash-image-preview",
|
| 29 |
+
contents=[prompt, image],
|
| 30 |
+
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 31 |
for part in response.candidates[0].content.parts:
|
| 32 |
if part.text is not None:
|
| 33 |
pass
|