pedro commited on
Commit
bc5a61b
·
1 Parent(s): aa6b0c2
Files changed (1) hide show
  1. handler.py +3 -1
handler.py CHANGED
@@ -30,11 +30,13 @@ class EndpointHandler:
30
 
31
  def __call__(self, data: Any) -> List[List[Dict[str, str]]]:
32
  logging.warning("inside __call__")
 
33
  inputs = data.pop("inputs", data)
 
34
  imagedata = inputs.pop("imagedata", inputs)
35
  if isinstance(imagedata, str):
36
  logging.warning("decoding pdfdata")
37
  image_bytes = base64.b64decode(imagedata)
38
  img = Image.open(io.BytesIO(image_bytes))
39
-
40
  return process_image(img)
 
30
 
31
  def __call__(self, data: Any) -> List[List[Dict[str, str]]]:
32
  logging.warning("inside __call__")
33
+ logging.warning(f"data keys {data.keys()}")
34
  inputs = data.pop("inputs", data)
35
+ logging.warning(f"inputs keys {inputs.keys()}")
36
  imagedata = inputs.pop("imagedata", inputs)
37
  if isinstance(imagedata, str):
38
  logging.warning("decoding pdfdata")
39
  image_bytes = base64.b64decode(imagedata)
40
  img = Image.open(io.BytesIO(image_bytes))
41
+ logging.warning(f"image {str(img)}")
42
  return process_image(img)