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/e965da8a8be884e4cded1e0c25d6b88379cfe5d7/utils.py
- Command line
-
hf download hf://spaces/blacksquadece/Knowledge_graph_MachineLearning@e965da8a8be884e4cded1e0c25d6b88379cfe5d7/utils.py
-
curl -L -o utils.py https://huggingface.co/spaces/blacksquadece/Knowledge_graph_MachineLearning/resolve/e965da8a8be884e4cded1e0c25d6b88379cfe5d7/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 |