Commit ·
c6d41c8
1
Parent(s): 5641d09
Update handler.py
Browse files- handler.py +3 -2
handler.py
CHANGED
|
@@ -33,8 +33,9 @@ class EndpointHandler:
|
|
| 33 |
The payload with the text prompt and generation parameters.
|
| 34 |
"""
|
| 35 |
# process input
|
| 36 |
-
|
| 37 |
-
|
|
|
|
| 38 |
|
| 39 |
# preprocess
|
| 40 |
image = Image.open(BytesIO(base64.b64decode(image_base64)))
|
|
|
|
| 33 |
The payload with the text prompt and generation parameters.
|
| 34 |
"""
|
| 35 |
# process input
|
| 36 |
+
inputs = data.pop("inputs", data)
|
| 37 |
+
image_base64 = inputs["image_base64"]
|
| 38 |
+
prompt = inputs["prompt"]
|
| 39 |
|
| 40 |
# preprocess
|
| 41 |
image = Image.open(BytesIO(base64.b64decode(image_base64)))
|