File size: 374 Bytes
fa83b40
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
from huggingface_hub import HfApi

api = HfApi()

# Replace with your actual namespace (e.g. "stephenebert") and desired Space name
repo_id = "stephenebert/sd-text2image"

# Create a public Gradio Space
api.create_repo(
    repo_id=repo_id,
    repo_type="space",
    space_sdk="gradio",
    private=False,
)
print(f"Created Space: https://huggingface.co/spaces/{repo_id}")