updates
Browse files- 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 |
-
|
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("
|
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 |
|