Update handler.py
Browse files- handler.py +2 -2
handler.py
CHANGED
@@ -20,10 +20,10 @@ class EndpointHandler:
|
|
20 |
img = Image.open(BytesIO(decoded_image)).convert("RGB")
|
21 |
return img
|
22 |
|
23 |
-
def __call__(self, data
|
24 |
"""Handle the incoming request."""
|
25 |
try:
|
26 |
-
# Extract the inputs from the
|
27 |
inputs = data.pop("inputs", data)
|
28 |
input_image = inputs['image']
|
29 |
question = inputs.get('question', "move to the red ball")
|
|
|
20 |
img = Image.open(BytesIO(decoded_image)).convert("RGB")
|
21 |
return img
|
22 |
|
23 |
+
def __call__(self, data):
|
24 |
"""Handle the incoming request."""
|
25 |
try:
|
26 |
+
# Extract the inputs from the data
|
27 |
inputs = data.pop("inputs", data)
|
28 |
input_image = inputs['image']
|
29 |
question = inputs.get('question', "move to the red ball")
|