image payload fix
Browse files- handler.py +1 -1
handler.py
CHANGED
@@ -33,7 +33,7 @@ class EndpointHandler():
|
|
33 |
|
34 |
if image_data is not None:
|
35 |
logger.info('image is encoded')
|
36 |
-
image = BytesIO(base64.b64decode(image_data))
|
37 |
|
38 |
if text_input:
|
39 |
processor = self.processor(text=text_input, return_tensors="pt", padding=True).to(device)
|
|
|
33 |
|
34 |
if image_data is not None:
|
35 |
logger.info('image is encoded')
|
36 |
+
image = Image.open(BytesIO(base64.b64decode(image_data)))
|
37 |
|
38 |
if text_input:
|
39 |
processor = self.processor(text=text_input, return_tensors="pt", padding=True).to(device)
|