Spaces:
Build error
Build error
Download utils.py from ml6team/Knowledge-graphs: direct link, hf CLI and curl.
- Browser
- Download file 218 Bytes
-
https://huggingface.co/spaces/ml6team/Knowledge-graphs/resolve/b40f4342de86cec730a0c7c64150da7748e63b37/utils.py
- Command line
-
hf download hf://spaces/ml6team/Knowledge-graphs@b40f4342de86cec730a0c7c64150da7748e63b37/utils.py
-
curl -L -o utils.py https://huggingface.co/spaces/ml6team/Knowledge-graphs/resolve/b40f4342de86cec730a0c7c64150da7748e63b37/utils.py
218 Bytes
| def clip_text(t, lenght = 4): | |
| t_sub = t.replace("...", "dotdotdot") | |
| t_clipped = ".".join(t_sub.split(".")[:lenght]) + "." | |
| t_reverted = t_clipped.replace("dotdotdot", "...") | |
| return t_reverted | |