ysharma HF Staff commited on
Commit
45895ff
·
verified ·
1 Parent(s): 9678ca5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
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
- return {"image": FileData(path=out_path), "seed": seed}
 
 
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)