fashxp commited on
Commit
8852310
1 Parent(s): 6617b85
Files changed (1) hide show
  1. handler.py +2 -2
handler.py CHANGED
@@ -12,12 +12,12 @@ class EndpointHandler():
12
  def __call__(self, data: Dict[str, Any]) -> List[Dict[str, Any]]:
13
  """
14
  data args:
15
- image (:obj:`string`)
16
  parameters (:obj:)
17
  Return:
18
  A :obj:`list`:. The list contains items that are dicts should be liked {"label": "XXX", "score": 0.82}
19
  """
20
- image_data = data.pop("image", data)
21
  # decode base64 image to PIL
22
  image = Image.open(BytesIO(base64.b64decode(image_data)))
23
 
 
12
  def __call__(self, data: Dict[str, Any]) -> List[Dict[str, Any]]:
13
  """
14
  data args:
15
+ inputs (:obj:`string`)
16
  parameters (:obj:)
17
  Return:
18
  A :obj:`list`:. The list contains items that are dicts should be liked {"label": "XXX", "score": 0.82}
19
  """
20
+ image_data = data.pop("inputs", data)
21
  # decode base64 image to PIL
22
  image = Image.open(BytesIO(base64.b64decode(image_data)))
23