Download uploadfile.py from GooooGLE/testVulModel: direct link, hf CLI and curl.
- Browser
- Download file 548 Bytes
-
https://huggingface.co/GooooGLE/testVulModel/resolve/main/uploadfile.py
- Command line
-
hf download hf://GooooGLE/testVulModel/uploadfile.py
-
curl -L -o uploadfile.py https://huggingface.co/GooooGLE/testVulModel/resolve/main/uploadfile.py
548 Bytes
| from huggingface_hub import Repository | |
| # Hugging Face 仓库的 URL (替换为你的实际仓库地址) | |
| repo_url = "https://huggingface.co/GooooGLE/testVulModel" | |
| # 需要上传的本地仓库路径 | |
| local_repo_path = "./" | |
| # 克隆 Hugging Face 仓库到本地路径 | |
| repo = Repository(local_dir=local_repo_path, clone_from=repo_url) | |
| # 推送所有本地更改到 Hugging Face 仓库(包括大文件) | |
| repo.git_add(auto_lfs_track=True) # 自动添加大文件到LFS | |
| repo.git_commit("Upload entire repository with large files") | |
| repo.git_push() | |