Spaces:
Runtime error
Runtime error
Download utils.py from blacksquadece/Knowledge_graph_MachineLearning: direct link, hf CLI and curl.
- Browser
- Download file 207 Bytes
-
https://huggingface.co/spaces/blacksquadece/Knowledge_graph_MachineLearning/resolve/main/utils.py
- Command line
-
hf download hf://spaces/blacksquadece/Knowledge_graph_MachineLearning/utils.py
-
curl -L -o utils.py https://huggingface.co/spaces/blacksquadece/Knowledge_graph_MachineLearning/resolve/main/utils.py
207 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 |