Commit
·
e6af97e
1
Parent(s):
9b2c38b
load image correctly
Browse files- handler.py +2 -1
handler.py
CHANGED
@@ -33,7 +33,8 @@ class EndpointHandler():
|
|
33 |
Return:
|
34 |
A :obj:`dict`:. base64 encoded image
|
35 |
"""
|
36 |
-
|
|
|
37 |
init_image.thumbnail((512, 512))
|
38 |
|
39 |
params = data.pop("parameters", data)
|
|
|
33 |
Return:
|
34 |
A :obj:`dict`:. base64 encoded image
|
35 |
"""
|
36 |
+
image_data = data.pop("inputs", data).decode('base64')
|
37 |
+
init_image = Image.open(image_data).convert("RGB")
|
38 |
init_image.thumbnail((512, 512))
|
39 |
|
40 |
params = data.pop("parameters", data)
|