ccclemenfff commited on
Commit
ef8d70b
·
1 Parent(s): b8aad58
Files changed (1) hide show
  1. handler.py +6 -5
handler.py CHANGED
@@ -1,7 +1,8 @@
1
- # handler.py
2
-
3
  from inference import Chat
4
- chat = Chat()
5
 
6
- def inference_fn(inputs):
7
- return chat.answer(inputs)
 
 
 
 
 
 
 
1
  from inference import Chat
 
2
 
3
+ class EndpointHandler:
4
+ def __init__(self, path="."):
5
+ self.chat = Chat()
6
+
7
+ def __call__(self, inputs):
8
+ return {"output": self.chat.answer(inputs)}