Spaces:
Runtime error
Runtime error
JustSkyDev commited on
Commit ·
2a9c2a8
1
Parent(s): a4ef1ef
Update app.py
Browse files
app.py
CHANGED
|
@@ -35,7 +35,7 @@ def api_segment(data: SegmentationBody):
|
|
| 35 |
|
| 36 |
# Convert PIL Image to base64 string
|
| 37 |
byte_arr = io.BytesIO()
|
| 38 |
-
output_image.save(byte_arr, format='
|
| 39 |
encoded_image = base64.b64encode(byte_arr.getvalue()).decode('ascii')
|
| 40 |
|
| 41 |
return { "image": encoded_image }
|
|
|
|
| 35 |
|
| 36 |
# Convert PIL Image to base64 string
|
| 37 |
byte_arr = io.BytesIO()
|
| 38 |
+
output_image.save(byte_arr, format='PNG')
|
| 39 |
encoded_image = base64.b64encode(byte_arr.getvalue()).decode('ascii')
|
| 40 |
|
| 41 |
return { "image": encoded_image }
|