Update handler.py
Browse files- handler.py +3 -11
handler.py
CHANGED
@@ -24,20 +24,12 @@ class EndpointHandler:
|
|
24 |
def __call__(self, data: Dict[str, Any]) -> List[Dict[str, Any]]:
|
25 |
"""
|
26 |
data args:
|
27 |
-
inputs (:obj
|
28 |
-
date (:obj: `str`)
|
29 |
Return:
|
30 |
-
A :obj:`list` | `dict`:
|
|
|
31 |
"""
|
32 |
|
33 |
-
# inputs = data.get("inputs")
|
34 |
-
# videos = read_video(inputs)
|
35 |
-
# with torch.no_grad():
|
36 |
-
# outputs = self.model(videos)
|
37 |
-
# logits = outputs.logits
|
38 |
-
# _, predicted = torch.max(logits, 1)
|
39 |
-
# return predicted.tolist()
|
40 |
-
|
41 |
inputs = data.get("inputs")
|
42 |
videos = read_video(inputs)
|
43 |
|
|
|
24 |
def __call__(self, data: Dict[str, Any]) -> List[Dict[str, Any]]:
|
25 |
"""
|
26 |
data args:
|
27 |
+
inputs (:obj:`str`): base64 encoded video data
|
|
|
28 |
Return:
|
29 |
+
A :obj:`list` | `dict`: A list of dictionaries with the top 3 class indices and their probabilities
|
30 |
+
for each input video.
|
31 |
"""
|
32 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
inputs = data.get("inputs")
|
34 |
videos = read_video(inputs)
|
35 |
|