Download t.py from OneShotOrg/OneShot: direct link, hf CLI and curl.
- Browser
- Download file 460 Bytes
-
https://huggingface.co/OneShotOrg/OneShot/resolve/main/t.py
- Command line
-
hf download hf://OneShotOrg/OneShot/t.py
-
curl -L -o t.py https://huggingface.co/OneShotOrg/OneShot/resolve/main/t.py
460 Bytes
| from huggingface_hub import HfApi, CommitOperationDelete | |
| api = HfApi() | |
| repo = "OneShotOrg/OneShot" | |
| files = api.list_repo_files(repo, repo_type="model") | |
| api.create_commit( | |
| repo_id=repo, | |
| repo_type="model", | |
| operations=[CommitOperationDelete(path_in_repo=f) for f in files], | |
| commit_message="Remove old checkpoint", | |
| ) | |
| api.super_squash_history( | |
| repo_id=repo, | |
| repo_type="model", | |
| branch="main", | |
| commit_message="Reset checkpoint", | |
| ) | |