Spaces:
Runtime error
Runtime error
import gradio as gr | |
from huggingface_hub import HfApi | |
repo_id = "stabilityai/stable-diffusion-xl-base-0.9" | |
hf_api = HfApi( | |
endpoint="https://huggingface.co/api/models/stabilityai/stable-diffusion-xl-base-0.9", # Can be a Private Hub endpoint. | |
token="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", # Token is not persisted on the machine. | |
) | |
token = gr.Textbox(label="token hugging face", placeholder="hg_...") | |
api.create_repo(repo_id=repo_id, repo_type="space", space_sdk="gradio") | |
gr.Interface.load("stabilityai/stable-diffusion-xl-base-0.9", src="models").launch() |