Download tiny_english/artifacts.py from helloboy91/tiny-base-300m: direct link, hf CLI and curl.
- Browser
- Download file 270 Bytes
-
https://huggingface.co/helloboy91/tiny-base-300m/resolve/main/tiny_english/artifacts.py
- Command line
-
hf download hf://helloboy91/tiny-base-300m/tiny_english/artifacts.py
-
curl -L -o artifacts.py https://huggingface.co/helloboy91/tiny-base-300m/resolve/main/tiny_english/artifacts.py
270 Bytes
| import hashlib | |
| from pathlib import Path | |
| def digest_file(path): | |
| digest = hashlib.sha256() | |
| with Path(path).open("rb") as handle: | |
| for chunk in iter(lambda: handle.read(1024 * 1024), b""): | |
| digest.update(chunk) | |
| return digest.hexdigest() | |