Download deploy_hf.py from AdamRCEO/ATHOS: direct link, hf CLI and curl.
- Browser
- Download file 1.5 kB
-
https://huggingface.co/AdamRCEO/ATHOS/resolve/main/deploy_hf.py
- Command line
-
hf download hf://AdamRCEO/ATHOS/deploy_hf.py
-
curl -L -o deploy_hf.py https://huggingface.co/AdamRCEO/ATHOS/resolve/main/deploy_hf.py
1.5 kB
| #!/usr/bin/env python3 | |
| """ | |
| ATHOS RIVERS REGALIA — HUGGING FACE HUB DEPLOYMENT | |
| Python deployment using huggingface_hub API | |
| """ | |
| import os | |
| from huggingface_hub import HfApi, upload_folder, create_repo | |
| REPO_ID = "synthicsoft/athos-rivers-regalia" | |
| LOCAL_DIR = "./athos-rivers-regalia" | |
| def deploy(): | |
| print("=" * 70) | |
| print("ATHOS RIVERS REGALIA — HUGGING FACE DEPLOYMENT") | |
| print("=" * 70) | |
| # Get token from environment | |
| token = os.environ.get("HF_TOKEN") | |
| if not token: | |
| print("ERROR: HF_TOKEN not set") | |
| print("Get token at: https://huggingface.co/settings/tokens") | |
| print("Set: export HF_TOKEN='your_token'") | |
| return | |
| # Initialize API | |
| api = HfApi(token=token) | |
| # Create repo (if not exists) | |
| try: | |
| create_repo(REPO_ID, repo_type="model", private=False, exist_ok=True, token=token) | |
| print(f"✓ Repository ready: https://huggingface.co/{REPO_ID}") | |
| except Exception as e: | |
| print(f"⚠ Repo creation: {e}") | |
| # Upload folder | |
| upload_folder( | |
| folder_path=LOCAL_DIR, | |
| repo_id=REPO_ID, | |
| repo_type="model", | |
| commit_message="ATHOS v3.4 — Rivers Regalia deployment", | |
| token=token, | |
| ) | |
| print(" | |
| " + "=" * 70) | |
| print("DEPLOYMENT COMPLETE") | |
| print("=" * 70) | |
| print(f"Repository: https://huggingface.co/{REPO_ID}") | |
| print(" | |
| Load via:") | |
| print(f" from_pretrained('{REPO_ID}')") | |
| print(" | |
| The Cathedral has no walls.") | |
| if __name__ == "__main__": | |
| deploy() | |