Spaces:
Build error
Build error
Download utils.py from niro-private/chatCSV: direct link, hf CLI and curl.
- Browser
- Download file 326 Bytes
-
https://huggingface.co/spaces/niro-private/chatCSV/resolve/main/utils.py
- Command line
-
hf download hf://spaces/niro-private/chatCSV/utils.py
-
curl -L -o utils.py https://huggingface.co/spaces/niro-private/chatCSV/resolve/main/utils.py
326 Bytes
| import hashlib | |
| def compute_sha1_from_file(file_path): | |
| with open(file_path, "rb") as file: | |
| bytes = file.read() | |
| readable_hash = compute_sha1_from_content(bytes) | |
| return readable_hash | |
| def compute_sha1_from_content(content): | |
| readable_hash = hashlib.sha1(content).hexdigest() | |
| return readable_hash | |