File size: 457 Bytes
4fb263a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
from huggingface_hub import HfApi

api = HfApi()

def create_huggingface_space():
    repo_id = "viven-b2"
    try:
        api.create_repo(
            repo_id=repo_id,
            repo_type="space",
            space_sdk="docker",
            private=False
        )
        print(f"Space '{repo_id}' created successfully.")
    except Exception as e:
        print(f"Error creating space: {e}")

if __name__ == "__main__":
    create_huggingface_space()