| 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}") |