majedk01 commited on
Commit
249e8d8
1 Parent(s): 314450e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -32,6 +32,11 @@ 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
 
36
  }
37
  API_URL = model_urls[model_choice]
@@ -71,7 +76,7 @@ iface = gr.Interface(
71
  fn=generate_image,
72
  inputs=[
73
  gr.components.Textbox(lines=2, placeholder="Enter the description of the image here..."),
74
- gr.components.Dropdown(choices=["Stable Diffusion v1.5",], label="Choose Model", value='Stable Diffusion v1.5'),
75
  gr.components.Checkbox(label="Translate The Text Before Generating Image", value=False)
76
  ],
77
  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
+ "stable-diffusion-xl-base-1.0": "https://api-inference.huggingface.co/models/stabilityai/stable-diffusion-xl-base-1.0",
36
+ "sdxl-turbo": "https://api-inference.huggingface.co/models/stabilityai/sdxl-turbo",
37
+ "MistoLine": "https://api-inference.huggingface.co/models/TheMistoAI/MistoLine",
38
+ "Hyper-SD": "https://api-inference.huggingface.co/models/ByteDance/Hyper-SD",
39
+
40
 
41
  }
42
  API_URL = model_urls[model_choice]
 
76
  fn=generate_image,
77
  inputs=[
78
  gr.components.Textbox(lines=2, placeholder="Enter the description of the image here..."),
79
+ gr.components.Dropdown(choices=["Stable Diffusion v1.5","stable-diffusion-xl-base-1.0","sdxl-turbo","MistoLine","Hyper-SD"], label="Choose Model", value='Stable Diffusion v1.5'),
80
  gr.components.Checkbox(label="Translate The Text Before Generating Image", value=False)
81
  ],
82
  outputs=gr.components.Image(),