Spaces:
Runtime error
Runtime error
Download utils.py from robustness-gym/summvis: direct link, hf CLI and curl.
- Browser
- Download file 153 Bytes
-
https://huggingface.co/spaces/robustness-gym/summvis/resolve/main/utils.py
- Command line
-
hf download hf://spaces/robustness-gym/summvis/utils.py
-
curl -L -o utils.py https://huggingface.co/spaces/robustness-gym/summvis/resolve/main/utils.py
153 Bytes
| import re | |
| def preprocess_text(text): | |
| split_punct = re.escape(r'()') | |
| return ' '.join(re.findall(rf"[^\s{split_punct}]+|[{split_punct}]", text)) | |