diff --git a/src/transformers/tokenization_blenderbot.py b/src/transformers/tokenization_blenderbot.py index d93962598851bf..ec350cf2625350 100644 --- a/src/transformers/tokenization_blenderbot.py +++ b/src/transformers/tokenization_blenderbot.py @@ -160,7 +160,7 @@ def bpe(self, token: str) -> str: return self.cache[token] token = re.sub("([.,!?()])", r" \1", token) token = re.sub("(')", r" \1 ", token) - token = re.sub("\s{2,}", " ", token) + token = re.sub(r"\s{2,}", " ", token) if "\n" in token: token = token.replace("\n", " __newln__")