asoderznik commited on
Commit
be8f6aa
1 Parent(s): 2c745bf

Update handler.py

Browse files
Files changed (1) hide show
  1. handler.py +4 -3
handler.py CHANGED
@@ -28,15 +28,16 @@ class EndpointHandler():
28
  #self.pipe = self.pipe.to(device)
29
 
30
 
31
- def __call__(self, *args, **kwargs) -> List[Dict[str, Any]]:
32
  """
33
  Args:
34
  image (:obj:`string`)
35
  Return:
36
  A :obj:`dict`:. base64 encoded image
37
  """
38
- logger.info('args received %s', args)
39
- logger.info('kwargs received %s', kwargs)
 
40
 
41
  # postprocess the prediction
42
  return {"image": "nothing"}
 
28
  #self.pipe = self.pipe.to(device)
29
 
30
 
31
+ def __call__(self, data) -> List[Dict[str, Any]]:
32
  """
33
  Args:
34
  image (:obj:`string`)
35
  Return:
36
  A :obj:`dict`:. base64 encoded image
37
  """
38
+ logger.info('data received %s', data)
39
+ inputs = data.get("inputs")
40
+ logger.info('inputs received %s', inputs)
41
 
42
  # postprocess the prediction
43
  return {"image": "nothing"}