nateraw commited on
Commit
655e52e
·
1 Parent(s): f33145d

Upload handler.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. handler.py +13 -0
handler.py ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ class EndpointHandler():
2
+ def __init__(self, path=""):
3
+ pass
4
+ def __call__(self, data):
5
+ """
6
+ Args:
7
+ data (:obj:):
8
+ includes the input data and the parameters for the inference.
9
+ Return:
10
+ A :obj:`dict`:. base64 encoded image
11
+ """
12
+ inputs = data.pop("inputs", data)
13
+ return [f"Hello, {x}" for x in inputs]