zemuwen commited on
Commit
595c82b
·
verified ·
1 Parent(s): 662a69b

Update handler.py

Browse files
Files changed (1) hide show
  1. handler.py +3 -1
handler.py CHANGED
@@ -15,5 +15,7 @@ class EndpointHandler:
15
  A :obj:`dict`: 返回生成的对话结果
16
  """
17
  inputs = data.get("inputs")
18
- conversation = self.pipeline(inputs)
 
 
19
  return {"generated_text": conversation}
 
15
  A :obj:`dict`: 返回生成的对话结果
16
  """
17
  inputs = data.get("inputs")
18
+ length = data.get("length")
19
+ conversation = self.pipeline(inputs,max_length=length)
20
+
21
  return {"generated_text": conversation}