File size: 571 Bytes
4be1360
fde3df6
 
9082dc5
 
 
 
23171a0
d28456e
 
 
7222f99
 
23171a0
d28456e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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()