Spaces:
Running
Running
Update main.py
Browse files
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")
|