Skip to content

Commit

Permalink
Update samples/python/multinomial_causal_lm/multinomial_causal_lm.py
Browse files Browse the repository at this point in the history
Co-authored-by: Ekaterina Aidova <[email protected]>
  • Loading branch information
pavel-esir and eaidova authored Aug 6, 2024
1 parent 1ae9083 commit b07204d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def put(self, token_id: int) -> bool:
word = text[self.print_len:]
self.tokens_cache = []
self.print_len = 0
elif len(text) >= 3 and text[-3:] == "�":
elif len(text) >= 3 and text[-3:] == chr(65533):
# Don't print incomplete text.
pass
elif len(text) > self.print_len:
Expand Down

0 comments on commit b07204d

Please sign in to comment.