SwordElucidator
commited on
Update handler.py
Browse files- handler.py +1 -1
handler.py
CHANGED
@@ -44,7 +44,7 @@ class EndpointHandler():
|
|
44 |
return parsed_answer
|
45 |
|
46 |
def __call__(self, data: Any) -> List[List[Dict[str, float]]]:
|
47 |
-
image = data.pop("image", None)
|
48 |
image = Image.open(BytesIO(base64.b64decode(image)))
|
49 |
|
50 |
caption = self.run_example(image, '<MORE_DETAILED_CAPTION>')
|
|
|
44 |
return parsed_answer
|
45 |
|
46 |
def __call__(self, data: Any) -> List[List[Dict[str, float]]]:
|
47 |
+
image = data['inputs'].pop("image", None)
|
48 |
image = Image.open(BytesIO(base64.b64decode(image)))
|
49 |
|
50 |
caption = self.run_example(image, '<MORE_DETAILED_CAPTION>')
|