This commit is contained in:
Awni Hannun 2024-10-20 19:20:50 -07:00
parent d8ca500136
commit d7775e67a6

View File

@ -193,7 +193,7 @@ class BPEStreamingDetokenizer(StreamingDetokenizer):
self.tokens = [] self.tokens = []
def _maybe_trim_space(self, current_text): def _maybe_trim_space(self, current_text):
if len(current_text) < 1 or current_text is None: if len(current_text) == 0:
return current_text return current_text
elif current_text[0] != " ": elif current_text[0] != " ":
return current_text return current_text