Commit
·
11aa7c8
1
Parent(s):
35b3b1d
Update handler.py
Browse files- handler.py +2 -0
handler.py
CHANGED
|
@@ -29,9 +29,11 @@ class EndpointHandler():
|
|
| 29 |
A :obj:`dict`:. base64 encoded image
|
| 30 |
"""
|
| 31 |
inputs = data.pop("inputs", data)
|
|
|
|
| 32 |
|
| 33 |
# decode base64 image to PIL
|
| 34 |
image = Image.open(BytesIO(base64.b64decode(inputs['image'])))
|
|
|
|
| 35 |
|
| 36 |
# run inference pipeline
|
| 37 |
upscaled_image = self.pipe(prompt="", image = image).images[0]
|
|
|
|
| 29 |
A :obj:`dict`:. base64 encoded image
|
| 30 |
"""
|
| 31 |
inputs = data.pop("inputs", data)
|
| 32 |
+
print(inputs)
|
| 33 |
|
| 34 |
# decode base64 image to PIL
|
| 35 |
image = Image.open(BytesIO(base64.b64decode(inputs['image'])))
|
| 36 |
+
print(image)
|
| 37 |
|
| 38 |
# run inference pipeline
|
| 39 |
upscaled_image = self.pipe(prompt="", image = image).images[0]
|