SDXL / app1.py
Megalino111's picture
Rename app.py to app1.py
7222f99
raw
history blame
571 Bytes
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()