Spaces:
Running
Running
Commit
·
6e4f970
1
Parent(s):
f307226
Update app.py
Browse files
app.py
CHANGED
@@ -1,14 +1,13 @@
|
|
1 |
import gradio as gr
|
2 |
from huggingface_hub import HfApi
|
|
|
|
|
3 |
repo_id = "stabilityai/stable-diffusion-xl-base-0.9"
|
4 |
-
hf_token="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"
|
|
|
5 |
|
6 |
-
|
7 |
-
def save_image_random_name(image):
|
8 |
-
random_string = ''.join(random.choices(string.ascii_letters, k=20)) + '.png'
|
9 |
-
image.save(random_string)
|
10 |
-
print(f"Saved image to {random_string}!")
|
11 |
|
12 |
-
|
13 |
|
14 |
-
gr.Interface.load("stabilityai/stable-diffusion-xl-base-0.9", src="models").launch()
|
|
|
1 |
import gradio as gr
|
2 |
from huggingface_hub import HfApi
|
3 |
+
rom gradio_client import Client
|
4 |
+
|
5 |
repo_id = "stabilityai/stable-diffusion-xl-base-0.9"
|
6 |
+
#hf_token="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"
|
7 |
+
|
8 |
|
9 |
+
HF_TOKEN = os.environ.get("HF_TOKEN")
|
|
|
|
|
|
|
|
|
10 |
|
11 |
+
client = Client.duplicate("stabilityai/stable-diffusion-xl-base-0.9", hf_token=HF_TOKEN)
|
12 |
|
13 |
+
#gr.Interface.load("stabilityai/stable-diffusion-xl-base-0.9", src="models").launch()
|