Download save.py from MacLeanLuke/gemma-2b-tool-tuned-code: direct link, hf CLI and curl.
- Browser
- Download file 444 Bytes
-
https://huggingface.co/spaces/MacLeanLuke/gemma-2b-tool-tuned-code/resolve/main/save.py
- Command line
-
hf download hf://spaces/MacLeanLuke/gemma-2b-tool-tuned-code/save.py
-
curl -L -o save.py https://huggingface.co/spaces/MacLeanLuke/gemma-2b-tool-tuned-code/resolve/main/save.py
444 Bytes
| from huggingface_hub import HfApi | |
| repo_id = "MacLeanLuke/gemma-2b-tool-tuned" # Change to your Hugging Face username & repo name | |
| # ✅ Upload model and tokenizer | |
| api = HfApi() | |
| api.create_repo(repo_id, exist_ok=True) | |
| # ✅ Push files | |
| model_path = "gemma-2-2B-it-macM3" | |
| api.upload_folder( | |
| folder_path=model_path, | |
| repo_id=repo_id, | |
| repo_type="model", | |
| ) | |
| print(f"Model successfully uploaded to: https://huggingface.co/{repo_id}") |