From b07204d818fbd19d487e35a05bde7fcf526540cf Mon Sep 17 00:00:00 2001 From: Pavel Esir Date: Tue, 6 Aug 2024 10:38:46 +0200 Subject: [PATCH] Update samples/python/multinomial_causal_lm/multinomial_causal_lm.py Co-authored-by: Ekaterina Aidova --- samples/python/multinomial_causal_lm/multinomial_causal_lm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/python/multinomial_causal_lm/multinomial_causal_lm.py b/samples/python/multinomial_causal_lm/multinomial_causal_lm.py index 3df7206a54..6300320264 100755 --- a/samples/python/multinomial_causal_lm/multinomial_causal_lm.py +++ b/samples/python/multinomial_causal_lm/multinomial_causal_lm.py @@ -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: