ccclemenfff commited on
Commit
8b2c047
·
1 Parent(s): ef8d70b
Files changed (1) hide show
  1. handler.py +4 -3
handler.py CHANGED
@@ -1,8 +1,9 @@
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)}
 
 
1
+ from inference import Chat # 你的模型类
2
 
3
  class EndpointHandler:
4
  def __init__(self, path="."):
5
  self.chat = Chat()
6
 
7
+ def __call__(self, data):
8
+ inputs = data.get("inputs", data)
9
+ return {"results": self.chat.answer(inputs)}