File size: 549 Bytes
5da5531
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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}")