ahmedmbutt commited on
Commit
760e14f
·
verified ·
1 Parent(s): 672243b

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +3 -3
main.py CHANGED
@@ -59,7 +59,7 @@ async def text_to_image(
59
  bytes = BytesIO()
60
  image.save(bytes, "PNG")
61
  # bytes.seek(0)
62
- return Response(bytes, media_type="image/png")
63
 
64
 
65
  @app.post("/image-to-image/")
@@ -85,7 +85,7 @@ async def image_to_image(
85
  bytes = BytesIO()
86
  image.save(bytes, "PNG")
87
  # bytes.seek(0)
88
- return Response(bytes, media_type="image/png")
89
 
90
 
91
  @app.post("/inpainting/")
@@ -116,4 +116,4 @@ async def inpainting(
116
  bytes = BytesIO()
117
  image.save(bytes, "PNG")
118
  # bytes.seek(0)
119
- return Response(bytes, media_type="image/png")
 
59
  bytes = BytesIO()
60
  image.save(bytes, "PNG")
61
  # bytes.seek(0)
62
+ return Response(content=bytes, media_type="image/png")
63
 
64
 
65
  @app.post("/image-to-image/")
 
85
  bytes = BytesIO()
86
  image.save(bytes, "PNG")
87
  # bytes.seek(0)
88
+ return Response(content=bytes, media_type="image/png")
89
 
90
 
91
  @app.post("/inpainting/")
 
116
  bytes = BytesIO()
117
  image.save(bytes, "PNG")
118
  # bytes.seek(0)
119
+ return Response(content=bytes, media_type="image/png")