Buckets:
| import os | |
| from nos.logging import logger | |
| def hf_login(write_permission: bool = False) -> str: | |
| """Login to huggingface hub.""" | |
| from huggingface_hub import login | |
| token = os.getenv("HUGGINGFACE_HUB_TOKEN", None) | |
| if token is None: | |
| raise ValueError("HUGGINGFACE_HUB_TOKEN is not set") | |
| logger.debug(f"Logging into HF with token={token[:4]}...{token[-4:]}") | |
| login( | |
| token=token, write_permission=write_permission | |
| ) # Login to HF (required for private repos with write permission) | |
| return token | |
Xet Storage Details
- Size:
- 538 Bytes
- Xet hash:
- fb396e3e67b9ded774dd5b28f748d1ea16b8fa2027db46c459385668f23e4d63
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.