Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -33,6 +33,7 @@ def generate_image(prompt, model_choice, translate=False):
|
|
33 |
model_urls = {
|
34 |
"Stable Diffusion v1.5": "https://api-inference.huggingface.co/models/runwayml/stable-diffusion-v1-5",
|
35 |
"stable_diffusion_arbert": "https://api-inference.huggingface.co/models/majedk01/stable_diffusion_arbert",
|
|
|
36 |
|
37 |
}
|
38 |
API_URL = model_urls[model_choice]
|
@@ -72,7 +73,7 @@ iface = gr.Interface(
|
|
72 |
fn=generate_image,
|
73 |
inputs=[
|
74 |
gr.components.Textbox(lines=2, placeholder="Enter the description of the image here..."),
|
75 |
-
gr.components.Dropdown(choices=["Stable Diffusion v1.5","stable_diffusion_arbert"], label="Choose Model", value='Stable Diffusion v1.5'),
|
76 |
gr.components.Checkbox(label="Translate The Text Before Generating Image", value=False)
|
77 |
],
|
78 |
outputs=gr.components.Image(),
|
|
|
33 |
model_urls = {
|
34 |
"Stable Diffusion v1.5": "https://api-inference.huggingface.co/models/runwayml/stable-diffusion-v1-5",
|
35 |
"stable_diffusion_arbert": "https://api-inference.huggingface.co/models/majedk01/stable_diffusion_arbert",
|
36 |
+
"dalle-3-xl-v2": "https://api-inference.huggingface.co/models/ehristoforu/dalle-3-xl-v2",
|
37 |
|
38 |
}
|
39 |
API_URL = model_urls[model_choice]
|
|
|
73 |
fn=generate_image,
|
74 |
inputs=[
|
75 |
gr.components.Textbox(lines=2, placeholder="Enter the description of the image here..."),
|
76 |
+
gr.components.Dropdown(choices=["Stable Diffusion v1.5","stable_diffusion_arbert","dalle-3-xl-v2"], label="Choose Model", value='Stable Diffusion v1.5'),
|
77 |
gr.components.Checkbox(label="Translate The Text Before Generating Image", value=False)
|
78 |
],
|
79 |
outputs=gr.components.Image(),
|