Update handler.py
Browse files- handler.py +2 -1
handler.py
CHANGED
|
@@ -25,7 +25,8 @@ class EndpointHandler:
|
|
| 25 |
|
| 26 |
def __call__(self, data: Dict[str, Any]) -> str:
|
| 27 |
# Prepare your messages with image and text
|
| 28 |
-
|
|
|
|
| 29 |
|
| 30 |
img_bytes = base64.b64decode(base64image)
|
| 31 |
pil_img = Image.open(io.BytesIO(img_bytes)).convert("RGB")
|
|
|
|
| 25 |
|
| 26 |
def __call__(self, data: Dict[str, Any]) -> str:
|
| 27 |
# Prepare your messages with image and text
|
| 28 |
+
inputs = data.get("inputs")
|
| 29 |
+
base64image = inputs["base64"]
|
| 30 |
|
| 31 |
img_bytes = base64.b64decode(base64image)
|
| 32 |
pil_img = Image.open(io.BytesIO(img_bytes)).convert("RGB")
|