| from dotenv import load_dotenv | |
| load_dotenv() | |
| from push_to_hf import create_hf_repo, push_files_to_bucket | |
| import os | |
| repo_id = "Brettapps/HF_AGENT" | |
| local_dir = "/home/brettanthonysjoberg079/hf_mcp_agent" | |
| try: | |
| print(f"Creating Space: {repo_id}") | |
| create_hf_repo(repo_id, repo_type="space", space_sdk="static") | |
| print(f"Pushing files to: {repo_id}") | |
| push_files_to_bucket(local_dir, repo_id, repo_type="space") | |
| print("Successfully created Space and pushed files.") | |
| except Exception as e: | |
| print(f"Operation failed: {e}") | |