nicklorch commited on
Commit
ff5a99d
1 Parent(s): ed041c3

image payload fix

Browse files
Files changed (1) hide show
  1. 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)