Spaces:
Runtime error
Runtime error
Download conv_data_gen/utils.py from ashish-sarvam/data-gen: direct link, hf CLI and curl.
- Browser
- Download file 246 Bytes
-
https://huggingface.co/spaces/ashish-sarvam/data-gen/resolve/main/conv_data_gen/utils.py
- Command line
-
hf download hf://spaces/ashish-sarvam/data-gen/conv_data_gen/utils.py
-
curl -L -o utils.py https://huggingface.co/spaces/ashish-sarvam/data-gen/resolve/main/conv_data_gen/utils.py
246 Bytes
| def slugify(value: str) -> str: | |
| s = (value or "").strip().lower() | |
| allowed = [c if c.isalnum() else "_" for c in s] | |
| slug = "".join(allowed) | |
| while "__" in slug: | |
| slug = slug.replace("__", "_") | |
| return slug.strip("_")[:25] | |