zesquirrelnator
commited on
Update handler.py
Browse files- handler.py +5 -4
handler.py
CHANGED
@@ -23,10 +23,11 @@ class EndpointHandler:
|
|
23 |
def handle(self, event, context):
|
24 |
"""Handle the incoming request."""
|
25 |
try:
|
26 |
-
# Extract the
|
27 |
-
|
28 |
-
|
29 |
-
|
|
|
30 |
|
31 |
# Preprocess the image
|
32 |
img = self.preprocess_image(input_image)
|
|
|
23 |
def handle(self, event, context):
|
24 |
"""Handle the incoming request."""
|
25 |
try:
|
26 |
+
# Extract the inputs from the event
|
27 |
+
data = event['body']
|
28 |
+
inputs = data.pop("inputs", data)
|
29 |
+
input_image = inputs['image']
|
30 |
+
question = inputs['question']
|
31 |
|
32 |
# Preprocess the image
|
33 |
img = self.preprocess_image(input_image)
|