Skip to content

Commit

Permalink
fix syntax error
Browse files Browse the repository at this point in the history
Signed-off-by: Gerald Shen <[email protected]>
  • Loading branch information
gshennvm committed Jul 12, 2023
1 parent b06588e commit acbfe08
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nemo/collections/nlp/modules/common/text_generation_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def put(self):
return "repetition_penalty must be a positive number no less than 1.0"
if not (1.0 <= repetition_penalty):
return "repetition_penalty must be a positive number no less than 1.0"

end_strings = ['<|endoftext|>']
if 'end_strings' in request.get_json():
end_strings = request.get_json()['end_strings']
Expand Down Expand Up @@ -191,7 +191,7 @@ def put(self):
greedy,
repetition_penalty,
end_strings=end_strings,
min_tokens_to_generate,
min_tokens_to_generate=min_tokens_to_generate,
**extra,
)
for k in output:
Expand Down

0 comments on commit acbfe08

Please sign in to comment.