yuvis's picture
Upload folder using huggingface_hub
f4c70c8 verified
raw
history blame contribute delete
140 Bytes
import re
def clean_text(text: str) -> str:
# Remove excessive whitespace
text = re.sub(r'\s+', ' ', text).strip()
return text