Spaces:
Build error
Build error
Download utils.py from CVPR/ml-talking-face: direct link, hf CLI and curl.
- Browser
- Download file 271 Bytes
-
https://huggingface.co/spaces/CVPR/ml-talking-face/resolve/main/utils.py
- Command line
-
hf download hf://spaces/CVPR/ml-talking-face/utils.py
-
curl -L -o utils.py https://huggingface.co/spaces/CVPR/ml-talking-face/resolve/main/utils.py
271 Bytes
| from pathlib import Path | |
| from urllib import request | |
| def get_snippet_from_url(url: str) -> str: | |
| response = request.urlopen(url) | |
| data = response.read().decode() | |
| return data | |
| def get_snippet_from_file(filepath: str) -> str: | |
| return Path(filepath).read_text() |