Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -57,9 +57,14 @@ def generate_travel_brochure_image(description: str) -> AgentImage:
|
|
57 |
description: A string representing text to be converted into a brochure.
|
58 |
"""
|
59 |
image_path = image_generation_tool(description)
|
|
|
|
|
|
|
|
|
60 |
if isinstance(image_path, str) and os.path.exists(image_path):
|
61 |
image = Image.open(image_path)
|
62 |
return AgentImage(image)
|
|
|
63 |
raise ValueError("Image generation failed or returned invalid path.")
|
64 |
|
65 |
|
|
|
57 |
description: A string representing text to be converted into a brochure.
|
58 |
"""
|
59 |
image_path = image_generation_tool(description)
|
60 |
+
|
61 |
+
print(f"[DEBUG] image_generation_tool returned path: {image_path}")
|
62 |
+
|
63 |
+
|
64 |
if isinstance(image_path, str) and os.path.exists(image_path):
|
65 |
image = Image.open(image_path)
|
66 |
return AgentImage(image)
|
67 |
+
|
68 |
raise ValueError("Image generation failed or returned invalid path.")
|
69 |
|
70 |
|