majedk01 commited on
Commit
d0673bd
1 Parent(s): a1adc6b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -8
app.py CHANGED
@@ -32,12 +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-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
- "arabic-building": "https://api-inference.huggingface.co/models/jfachrel/arabic-building",
40
-
41
 
42
  }
43
  API_URL = model_urls[model_choice]
@@ -77,7 +71,7 @@ iface = gr.Interface(
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","stable-diffusion-xl-base-1.0","sdxl-turbo","MistoLine","Hyper-SD","arabic-building"], 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(),
@@ -87,4 +81,4 @@ iface = gr.Interface(
87
  css=css
88
  )
89
  # Launch the interface
90
- iface.launch()
 
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
  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(),
 
81
  css=css
82
  )
83
  # Launch the interface
84
+ iface.launch()