add custom handler
Browse files- __pycache__/handler.cpython-38.pyc +0 -0
- handler.py +1 -1
__pycache__/handler.cpython-38.pyc
CHANGED
|
Binary files a/__pycache__/handler.cpython-38.pyc and b/__pycache__/handler.cpython-38.pyc differ
|
|
|
handler.py
CHANGED
|
@@ -8,7 +8,7 @@ class EndpointHandler():
|
|
| 8 |
|
| 9 |
def __call__(self, data: Dict[str, Any]) -> bytes:
|
| 10 |
# get inputs
|
| 11 |
-
prompt = data.pop("
|
| 12 |
|
| 13 |
# run normal prediction
|
| 14 |
images = self.sd.text_to_image(prompt, batch_size=1)
|
|
|
|
| 8 |
|
| 9 |
def __call__(self, data: Dict[str, Any]) -> bytes:
|
| 10 |
# get inputs
|
| 11 |
+
prompt = data.pop("inputs", data)
|
| 12 |
|
| 13 |
# run normal prediction
|
| 14 |
images = self.sd.text_to_image(prompt, batch_size=1)
|