Spaces:
Build error
Build error
File size: 152 Bytes
ecb69bb | 1 2 3 4 5 6 7 | import re
def clean_text(text: str) -> str:
text = re.sub(r"\n{3,}", "\n\n", text)
text = re.sub(r"[ \t]+", " ", text)
return text.strip() |