1-800-BAD-CODE commited on
Commit
3dff1e5
1 Parent(s): 3c38cd3

Create handler.py

Browse files
Files changed (1) hide show
  1. handler.py +16 -0
handler.py ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ class EndpointHandler():
2
+ def __init__(self, path=""):
3
+ pass
4
+
5
+
6
+ def __call__(self, data: Any) -> List[List[Dict[str, float]]]:
7
+ """
8
+ Args:
9
+ data (:obj:):
10
+ includes the input data and the parameters for the inference.
11
+ Return:
12
+ A :obj:`list`:. The object returned should be a list of one list like [[{"label": 0.9939950108528137}]] containing :
13
+ - "label": A string representing what the label/class is. There can be multiple labels.
14
+ - "score": A score between 0 and 1 describing how confident the model is for this label/class.
15
+ """
16
+ pass