Spaces:
Runtime error
Runtime error
Download src/blu/utils.py from Aravindhan11/blu-assistant: direct link, hf CLI and curl.
- Browser
- Download file 186 Bytes
-
https://huggingface.co/spaces/Aravindhan11/blu-assistant/resolve/main/src/blu/utils.py
- Command line
-
hf download hf://spaces/Aravindhan11/blu-assistant/src/blu/utils.py
-
curl -L -o utils.py https://huggingface.co/spaces/Aravindhan11/blu-assistant/resolve/main/src/blu/utils.py
186 Bytes
| import re | |
| from .config import cfg | |
| def violates_safety(text: str) -> bool: | |
| for pat in cfg.blocked_patterns: | |
| if re.search(pat, text): | |
| return True | |
| return False | |