Update app.py
Browse files
app.py
CHANGED
@@ -8,7 +8,7 @@ from PIL import Image
|
|
8 |
from deep_translator import GoogleTranslator
|
9 |
import json
|
10 |
|
11 |
-
|
12 |
|
13 |
API_URL = "https://api-inference.huggingface.co/models/stabilityai/stable-diffusion-3-medium-diffusers"
|
14 |
API_TOKEN = os.getenv("HF_READ_TOKEN")
|
@@ -64,13 +64,14 @@ css = """
|
|
64 |
}
|
65 |
"""
|
66 |
|
67 |
-
with gr.Blocks(theme='
|
68 |
gr.HTML("<center><h1>Stable Diffusion 3 Medium</h1></center>")
|
69 |
with gr.Column(elem_id="app-container"):
|
70 |
with gr.Row():
|
71 |
with gr.Column(elem_id="prompt-container"):
|
72 |
with gr.Row():
|
73 |
text_prompt = gr.Textbox(label="Prompt", placeholder="Enter a prompt here", lines=2, elem_id="prompt-text-input")
|
|
|
74 |
with gr.Row():
|
75 |
with gr.Accordion("Advanced Settings", open=False):
|
76 |
negative_prompt = gr.Textbox(label="Negative Prompt", placeholder="What should not be in the image", value="(deformed, distorted, disfigured), poorly drawn, bad anatomy, wrong anatomy, extra limb, missing limb, floating limbs, (mutated hands and fingers), disconnected limbs, mutation, mutated, ugly, disgusting, blurry, amputation, misspellings, typos", lines=3, elem_id="negative-prompt-text-input")
|
@@ -79,9 +80,6 @@ with gr.Blocks(theme='Nymbo/Nymbo_Theme', css=css) as app:
|
|
79 |
method = gr.Radio(label="Sampling method", value="DPM++ 2M Karras", choices=["DPM++ 2M Karras", "DPM++ SDE Karras", "Euler", "Euler a", "Heun", "DDIM"])
|
80 |
strength = gr.Slider(label="Strength", value=0.7, minimum=0, maximum=1, step=0.001)
|
81 |
seed = gr.Slider(label="Seed", value=-1, minimum=-1, maximum=1000000000, step=1)
|
82 |
-
|
83 |
-
with gr.Row():
|
84 |
-
text_button = gr.Button("Run", variant='primary', elem_id="gen-button")
|
85 |
with gr.Row():
|
86 |
image_output = gr.Image(type="pil", label="Image Output", elem_id="gallery")
|
87 |
|
|
|
8 |
from deep_translator import GoogleTranslator
|
9 |
import json
|
10 |
|
11 |
+
|
12 |
|
13 |
API_URL = "https://api-inference.huggingface.co/models/stabilityai/stable-diffusion-3-medium-diffusers"
|
14 |
API_TOKEN = os.getenv("HF_READ_TOKEN")
|
|
|
64 |
}
|
65 |
"""
|
66 |
|
67 |
+
with gr.Blocks(theme='Hev832/niceandsimple', css=css) as app:
|
68 |
gr.HTML("<center><h1>Stable Diffusion 3 Medium</h1></center>")
|
69 |
with gr.Column(elem_id="app-container"):
|
70 |
with gr.Row():
|
71 |
with gr.Column(elem_id="prompt-container"):
|
72 |
with gr.Row():
|
73 |
text_prompt = gr.Textbox(label="Prompt", placeholder="Enter a prompt here", lines=2, elem_id="prompt-text-input")
|
74 |
+
text_button = gr.Button("Run", variant='primary', elem_id="gen-button")
|
75 |
with gr.Row():
|
76 |
with gr.Accordion("Advanced Settings", open=False):
|
77 |
negative_prompt = gr.Textbox(label="Negative Prompt", placeholder="What should not be in the image", value="(deformed, distorted, disfigured), poorly drawn, bad anatomy, wrong anatomy, extra limb, missing limb, floating limbs, (mutated hands and fingers), disconnected limbs, mutation, mutated, ugly, disgusting, blurry, amputation, misspellings, typos", lines=3, elem_id="negative-prompt-text-input")
|
|
|
80 |
method = gr.Radio(label="Sampling method", value="DPM++ 2M Karras", choices=["DPM++ 2M Karras", "DPM++ SDE Karras", "Euler", "Euler a", "Heun", "DDIM"])
|
81 |
strength = gr.Slider(label="Strength", value=0.7, minimum=0, maximum=1, step=0.001)
|
82 |
seed = gr.Slider(label="Seed", value=-1, minimum=-1, maximum=1000000000, step=1)
|
|
|
|
|
|
|
83 |
with gr.Row():
|
84 |
image_output = gr.Image(type="pil", label="Image Output", elem_id="gallery")
|
85 |
|