Spaces:
Running on Zero
Running on Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -117,8 +117,10 @@ def edit_image(image: FileData, prompt: str) -> dict:
|
|
| 117 |
fd, out_path = tempfile.mkstemp(suffix=".png")
|
| 118 |
os.close(fd)
|
| 119 |
result.save(out_path)
|
| 120 |
-
print(f"[edit_image] saved to {out_path}", flush=True)
|
| 121 |
-
|
|
|
|
|
|
|
| 122 |
|
| 123 |
|
| 124 |
@server.get("/", response_class=HTMLResponse)
|
|
|
|
| 117 |
fd, out_path = tempfile.mkstemp(suffix=".png")
|
| 118 |
os.close(fd)
|
| 119 |
result.save(out_path)
|
| 120 |
+
print(f"[edit_image] saved to {out_path} exists={os.path.exists(out_path)} size={os.path.getsize(out_path)}", flush=True)
|
| 121 |
+
payload = {"image": FileData(path=out_path), "seed": seed}
|
| 122 |
+
print(f"[edit_image] returning payload keys={list(payload.keys())} image={payload['image']}", flush=True)
|
| 123 |
+
return payload
|
| 124 |
|
| 125 |
|
| 126 |
@server.get("/", response_class=HTMLResponse)
|