CodeJackR
commited on
Commit
·
064d94e
1
Parent(s):
c78d04e
Input image as image
Browse files- handler.py +2 -2
handler.py
CHANGED
|
@@ -39,10 +39,10 @@ class EndpointHandler():
|
|
| 39 |
inputs = data.pop("inputs", data)
|
| 40 |
parameters = data.pop("parameters", {})
|
| 41 |
|
| 42 |
-
|
| 43 |
|
| 44 |
# img = Image.open(io.BytesIO(image_bytes)).convert("RGB")
|
| 45 |
-
img = raw_images[0]
|
| 46 |
|
| 47 |
# SAM requires input prompts, so we'll generate a center point prompt
|
| 48 |
height, width = img.size[1], img.size[0] # PIL returns (width, height)
|
|
|
|
| 39 |
inputs = data.pop("inputs", data)
|
| 40 |
parameters = data.pop("parameters", {})
|
| 41 |
|
| 42 |
+
img = Image.open(io.BytesIO(inputs))
|
| 43 |
|
| 44 |
# img = Image.open(io.BytesIO(image_bytes)).convert("RGB")
|
| 45 |
+
# img = raw_images[0]
|
| 46 |
|
| 47 |
# SAM requires input prompts, so we'll generate a center point prompt
|
| 48 |
height, width = img.size[1], img.size[0] # PIL returns (width, height)
|