asadmasad commited on
Commit
99e5a96
1 Parent(s): e83f7e4

Update handler.py

Browse files
Files changed (1) hide show
  1. handler.py +2 -2
handler.py CHANGED
@@ -37,9 +37,9 @@ class EndpointHandler:
37
 
38
  # pass inputs with all kwargs in data
39
  if parameters is not None:
40
- outputs = self.model.generate(**inputs, **parameters)
41
  else:
42
- outputs = self.model.generate(**inputs)
43
 
44
  # postprocess the prediction
45
  prediction = self.tokenizer.decode(outputs[0], skip_special_tokens=True)
 
37
 
38
  # pass inputs with all kwargs in data
39
  if parameters is not None:
40
+ outputs = self.model.generate(**inputs, max_new_tokens=880, **parameters)
41
  else:
42
+ outputs = self.model.generate(**inputs, max_new_tokens=880)
43
 
44
  # postprocess the prediction
45
  prediction = self.tokenizer.decode(outputs[0], skip_special_tokens=True)