gardarjuto commited on
Commit
6ce586a
1 Parent(s): fc73940

fix max_length

Browse files
Files changed (1) hide show
  1. handler.py +1 -1
handler.py CHANGED
@@ -108,7 +108,7 @@ class EndpointHandler:
108
  # Check valid inputs
109
  if not self.check_valid_inputs(input_a, input_b, task):
110
  return [{"error": "Invalid inputs"}]
111
- if "max_new_tokens" not in parameters:
112
  parameters["max_new_tokens"] = 512
113
 
114
  # Tokenize the input
 
108
  # Check valid inputs
109
  if not self.check_valid_inputs(input_a, input_b, task):
110
  return [{"error": "Invalid inputs"}]
111
+ if "max_new_tokens" not in parameters and "max_length" not in parameters:
112
  parameters["max_new_tokens"] = 512
113
 
114
  # Tokenize the input