#!/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()