zemuwen commited on
Commit
eb224c5
·
verified ·
1 Parent(s): f370b92

Update handler.py

Browse files
Files changed (1) hide show
  1. handler.py +4 -1
handler.py CHANGED
@@ -9,5 +9,8 @@ class EndpointHandler():
9
  def __call__(self, data: Dict[str, Any]) -> List[Dict[str, Any]]:
10
  # 处理输入数据并返回预测结果
11
  inputs = data.get("inputs", "")
12
- prediction = self.pipeline(inputs)
 
 
 
13
  return {"response": conversation.generated_responses[0]}
 
9
  def __call__(self, data: Dict[str, Any]) -> List[Dict[str, Any]]:
10
  # 处理输入数据并返回预测结果
11
  inputs = data.get("inputs", "")
12
+ # 使用对话模型生成响应
13
+ conversation = self.pipeline(inputs)
14
+
15
+ # 返回模型的响应
16
  return {"response": conversation.generated_responses[0]}