File size: 256 Bytes
8b2c047
cf932d8
ef8d70b
 
 
 
8b2c047
 
 
1
2
3
4
5
6
7
8
9
from inference import Chat  # 你的模型类

class EndpointHandler:
    def __init__(self, path="."):
        self.chat = Chat()

    def __call__(self, data):
        inputs = data.get("inputs", data)
        return {"results": self.chat.answer(inputs)}