Ashrafb commited on
Commit
ad20f87
1 Parent(s): 9497517

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +1 -1
main.py CHANGED
@@ -54,7 +54,7 @@ def generate(prompt, history, temperature=0.9, max_new_tokens=512, top_p=0.95, r
54
  word += decoded_text
55
 
56
  # If the token is a space or the end of the stream, add the word to the output and reset the word
57
- if token_text == " " or response.is_end_of_sequence:
58
  output += word + " "
59
  word = ""
60
 
 
54
  word += decoded_text
55
 
56
  # If the token is a space or the end of the stream, add the word to the output and reset the word
57
+ if token_text == " " or response.is_end_of_stream:
58
  output += word + " "
59
  word = ""
60