sd-text2image / create_space.py
Stephen Ebert
Add Stable Diffusion v1.5 Text→Image Gradio demo
fa83b40
raw
history blame contribute delete
374 Bytes
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}")