Download push.py from CMC-OPENAI/CMC-AI-Legal-32B: direct link, hf CLI and curl.
- Browser
- Download file 475 Bytes
-
https://huggingface.co/CMC-OPENAI/CMC-AI-Legal-32B/resolve/main/push.py
- Command line
-
hf download hf://CMC-OPENAI/CMC-AI-Legal-32B/push.py
-
curl -L -o push.py https://huggingface.co/CMC-OPENAI/CMC-AI-Legal-32B/resolve/main/push.py
475 Bytes
| from huggingface_hub import login, HfApi | |
| import os | |
| login() | |
| api = HfApi() | |
| repo_id = "CMC-OPENAI/CMC-AI-Legal-32B" | |
| for file_name in os.listdir("./"): | |
| if file_name == "push.py": | |
| continue | |
| if os.path.isfile(file_name): | |
| api.upload_file( | |
| path_or_fileobj=file_name, | |
| path_in_repo=file_name, | |
| repo_id=repo_id, | |
| repo_type="CMC-OPENAI/CMC-AI-Legal-32B", | |
| commit_message=f"Upload {file_name}" | |
| ) | |