Spaces:
Runtime error
Runtime error
Download utils.py from teamaMohamed115/code-generation: direct link, hf CLI and curl.
- Browser
- Download file 209 Bytes
-
https://huggingface.co/spaces/teamaMohamed115/code-generation/resolve/main/utils.py
- Command line
-
hf download hf://spaces/teamaMohamed115/code-generation/utils.py
-
curl -L -o utils.py https://huggingface.co/spaces/teamaMohamed115/code-generation/resolve/main/utils.py
209 Bytes
| # Small helper utilities in case you want to expand the Space | |
| def sanitize_prompt(text: str) -> str: | |
| """Basic sanitization: remove non-printable chars""" | |
| return ''.join(ch for ch in text if ch.isprintable()) |