aayushgs commited on
Commit
ea3ab38
·
verified ·
1 Parent(s): 0916c64
Files changed (1) hide show
  1. handler.py +3 -3
handler.py CHANGED
@@ -13,7 +13,7 @@ class EndpointHandler():
13
  """
14
  data args:
15
  images (:obj:`string`)
16
- candiates (:obj:`list`)
17
  Return:
18
  A :obj:`list`:. The list contains items that are dicts should be liked {"label": "XXX", "score": 0.82}
19
  """
@@ -22,6 +22,6 @@ class EndpointHandler():
22
  # decode base64 image to PIL
23
  image = Image.open(BytesIO(base64.b64decode(inputs['image'])))
24
 
25
- # run prediction one image wit provided candiates
26
- prediction = self.pipeline(images=[image], candidate_labels=inputs["candiates"])
27
  return prediction[0]
 
13
  """
14
  data args:
15
  images (:obj:`string`)
16
+ candidates (:obj:`list`)
17
  Return:
18
  A :obj:`list`:. The list contains items that are dicts should be liked {"label": "XXX", "score": 0.82}
19
  """
 
22
  # decode base64 image to PIL
23
  image = Image.open(BytesIO(base64.b64decode(inputs['image'])))
24
 
25
+ # run prediction one image wit provided candidates
26
+ prediction = self.pipeline(images=[image], candidate_labels=inputs["candidates"])
27
  return prediction[0]