Download fara/utils.py from HyperCluster/Fara-BrowserUse: direct link, hf CLI and curl.
- Browser
- Download file 254 Bytes
-
https://huggingface.co/spaces/HyperCluster/Fara-BrowserUse/resolve/main/fara/utils.py
- Command line
-
hf download hf://spaces/HyperCluster/Fara-BrowserUse/fara/utils.py
-
curl -L -o utils.py https://huggingface.co/spaces/HyperCluster/Fara-BrowserUse/resolve/main/fara/utils.py
254 Bytes
| def strip_url_query(url): | |
| return url.split("?", 1)[0] | |
| def get_trimmed_url(url, max_len): | |
| trimmed_url = strip_url_query(url) | |
| if len(trimmed_url) > max_len: | |
| trimmed_url = trimmed_url[:max_len] + " ..." | |
| return trimmed_url | |