Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -34,6 +34,11 @@ def generate_image(prompt, model_choice, translate=False):
|
|
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,7 +78,7 @@ iface = gr.Interface(
|
|
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(),
|
|
|
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 |
+
"midjourney-v6": "https://api-inference.huggingface.co/models/Kvikontent/midjourney-v6",
|
38 |
+
"openjourney-v4": "https://api-inference.huggingface.co/models/prompthero/openjourney-v4",
|
39 |
+
"LCM_Dreamshaper_v7": "https://api-inference.huggingface.co/models/SimianLuo/LCM_Dreamshaper_v7",
|
40 |
+
|
41 |
+
|
42 |
|
43 |
}
|
44 |
API_URL = model_urls[model_choice]
|
|
|
78 |
fn=generate_image,
|
79 |
inputs=[
|
80 |
gr.components.Textbox(lines=2, placeholder="Enter the description of the image here..."),
|
81 |
+
gr.components.Dropdown(choices=["Stable Diffusion v1.5","stable_diffusion_arbert","dalle-3-xl-v2","midjourney-v6","openjourney-v4","LCM_Dreamshaper_v7"], label="Choose Model", value='Stable Diffusion v1.5'),
|
82 |
gr.components.Checkbox(label="Translate The Text Before Generating Image", value=False)
|
83 |
],
|
84 |
outputs=gr.components.Image(),
|