Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -32,7 +32,6 @@ def generate_image(prompt, model_choice, translate=False):
|
|
32 |
prompt = translate_text(prompt, target_language='en') # Assuming you want to translate to English
|
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 |
"midjourney-v6": "https://api-inference.huggingface.co/models/Kvikontent/midjourney-v6",
|
38 |
"openjourney-v4": "https://api-inference.huggingface.co/models/prompthero/openjourney-v4",
|
@@ -78,7 +77,7 @@ iface = gr.Interface(
|
|
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","
|
82 |
gr.components.Checkbox(label="Translate The Text Before Generating Image", value=False)
|
83 |
],
|
84 |
outputs=gr.components.Image(),
|
|
|
32 |
prompt = translate_text(prompt, target_language='en') # Assuming you want to translate to English
|
33 |
model_urls = {
|
34 |
"Stable Diffusion v1.5": "https://api-inference.huggingface.co/models/runwayml/stable-diffusion-v1-5",
|
|
|
35 |
"dalle-3-xl-v2": "https://api-inference.huggingface.co/models/ehristoforu/dalle-3-xl-v2",
|
36 |
"midjourney-v6": "https://api-inference.huggingface.co/models/Kvikontent/midjourney-v6",
|
37 |
"openjourney-v4": "https://api-inference.huggingface.co/models/prompthero/openjourney-v4",
|
|
|
77 |
fn=generate_image,
|
78 |
inputs=[
|
79 |
gr.components.Textbox(lines=2, placeholder="Enter the description of the image here..."),
|
80 |
+
gr.components.Dropdown(choices=["Stable Diffusion v1.5","dalle-3-xl-v2","midjourney-v6","openjourney-v4","LCM_Dreamshaper_v7"], label="Choose Model", value='Stable Diffusion v1.5'),
|
81 |
gr.components.Checkbox(label="Translate The Text Before Generating Image", value=False)
|
82 |
],
|
83 |
outputs=gr.components.Image(),
|