Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -51,10 +51,9 @@ def generate_image(prompt: str) -> AgentImage:
|
|
| 51 |
Args:
|
| 52 |
prompt: The text description of the image to generate.
|
| 53 |
"""
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
return AgentImage(out_path)
|
| 58 |
|
| 59 |
|
| 60 |
final_answer = FinalAnswerTool()
|
|
|
|
| 51 |
Args:
|
| 52 |
prompt: The text description of the image to generate.
|
| 53 |
"""
|
| 54 |
+
pil_img = _image_generator(prompt=prompt) # PIL image
|
| 55 |
+
return AgentImage(pil_img) # ✅ wrap the PIL object, not a filepath
|
| 56 |
+
|
|
|
|
| 57 |
|
| 58 |
|
| 59 |
final_answer = FinalAnswerTool()
|