Commit
·
be8f6aa
1
Parent(s):
2c745bf
Update handler.py
Browse files- handler.py +4 -3
handler.py
CHANGED
|
@@ -28,15 +28,16 @@ class EndpointHandler():
|
|
| 28 |
#self.pipe = self.pipe.to(device)
|
| 29 |
|
| 30 |
|
| 31 |
-
def __call__(self,
|
| 32 |
"""
|
| 33 |
Args:
|
| 34 |
image (:obj:`string`)
|
| 35 |
Return:
|
| 36 |
A :obj:`dict`:. base64 encoded image
|
| 37 |
"""
|
| 38 |
-
logger.info('
|
| 39 |
-
|
|
|
|
| 40 |
|
| 41 |
# postprocess the prediction
|
| 42 |
return {"image": "nothing"}
|
|
|
|
| 28 |
#self.pipe = self.pipe.to(device)
|
| 29 |
|
| 30 |
|
| 31 |
+
def __call__(self, data) -> List[Dict[str, Any]]:
|
| 32 |
"""
|
| 33 |
Args:
|
| 34 |
image (:obj:`string`)
|
| 35 |
Return:
|
| 36 |
A :obj:`dict`:. base64 encoded image
|
| 37 |
"""
|
| 38 |
+
logger.info('data received %s', data)
|
| 39 |
+
inputs = data.get("inputs")
|
| 40 |
+
logger.info('inputs received %s', inputs)
|
| 41 |
|
| 42 |
# postprocess the prediction
|
| 43 |
return {"image": "nothing"}
|