Spaces:
Runtime error
Runtime error
Commit
·
8d68db5
1
Parent(s):
07d31c3
Update app.py
Browse files
app.py
CHANGED
|
@@ -12,7 +12,7 @@ list_models = [
|
|
| 12 |
"Anything-V4",
|
| 13 |
"Disney-Pixar-Cartoon",
|
| 14 |
"Pixel-Art-XL",
|
| 15 |
-
"
|
| 16 |
]
|
| 17 |
|
| 18 |
def generate_txt2img(current_model, prompt, is_negative=False, image_style="None style", steps=50, cfg_scale=7,
|
|
@@ -22,6 +22,7 @@ def generate_txt2img(current_model, prompt, is_negative=False, image_style="None
|
|
| 22 |
API_URL = "https://api-inference.huggingface.co/models/runwayml/stable-diffusion-v1-5"
|
| 23 |
elif current_model == "SDXL-1.0":
|
| 24 |
API_URL = "https://api-inference.huggingface.co/models/stabilityai/stable-diffusion-xl-base-1.0"
|
|
|
|
| 25 |
elif current_model == "OpenJourney-V4":
|
| 26 |
API_URL = "https://api-inference.huggingface.co/models/prompthero/openjourney"
|
| 27 |
elif current_model == "Anything-V4":
|
|
@@ -210,7 +211,7 @@ with gr.Blocks(css=css) as demo:
|
|
| 210 |
current_model = gr.Dropdown(label="Current Model", choices=list_models, value=list_models[1])
|
| 211 |
|
| 212 |
with gr.Row(elem_id="prompt-container"):
|
| 213 |
-
text_prompt = gr.Textbox(label="Prompt", placeholder="a cute
|
| 214 |
text_button = gr.Button("Generate", variant='primary', elem_id="gen-button")
|
| 215 |
|
| 216 |
with gr.Row():
|
|
|
|
| 12 |
"Anything-V4",
|
| 13 |
"Disney-Pixar-Cartoon",
|
| 14 |
"Pixel-Art-XL",
|
| 15 |
+
"Dalle-3-XL",
|
| 16 |
]
|
| 17 |
|
| 18 |
def generate_txt2img(current_model, prompt, is_negative=False, image_style="None style", steps=50, cfg_scale=7,
|
|
|
|
| 22 |
API_URL = "https://api-inference.huggingface.co/models/runwayml/stable-diffusion-v1-5"
|
| 23 |
elif current_model == "SDXL-1.0":
|
| 24 |
API_URL = "https://api-inference.huggingface.co/models/stabilityai/stable-diffusion-xl-base-1.0"
|
| 25 |
+
API_URL = "https://api-inference.huggingface.co/models/stabilityai/stable-diffusion-xl-refiner-1.0"
|
| 26 |
elif current_model == "OpenJourney-V4":
|
| 27 |
API_URL = "https://api-inference.huggingface.co/models/prompthero/openjourney"
|
| 28 |
elif current_model == "Anything-V4":
|
|
|
|
| 211 |
current_model = gr.Dropdown(label="Current Model", choices=list_models, value=list_models[1])
|
| 212 |
|
| 213 |
with gr.Row(elem_id="prompt-container"):
|
| 214 |
+
text_prompt = gr.Textbox(label="Prompt", placeholder="a cute dog", lines=1, elem_id="prompt-text-input")
|
| 215 |
text_button = gr.Button("Generate", variant='primary', elem_id="gen-button")
|
| 216 |
|
| 217 |
with gr.Row():
|