Spaces:
Running
Running
Commit
·
cb7091d
1
Parent(s):
dea231e
Update app.py
Browse files
app.py
CHANGED
@@ -18,21 +18,21 @@ list_models = [
|
|
18 |
|
19 |
def generate_txt2img(current_model, prompt, is_negative=False, image_style="None style", steps=50, cfg_scale=7,
|
20 |
seed=None):
|
21 |
-
|
22 |
API_URL = "https://api-inference.huggingface.co/models/runwayml/stable-diffusion-v1-5"
|
23 |
-
|
24 |
API_URL = "https://api-inference.huggingface.co/models/stabilityai/stable-diffusion-xl-base-1.0"
|
25 |
-
|
26 |
API_URL = "https://api-inference.huggingface.co/models/prompthero/openjourney"
|
27 |
-
|
28 |
API_URL = "https://api-inference.huggingface.co/models/xyn-ai/anything-v4.0"
|
29 |
-
|
30 |
API_URL = "https://api-inference.huggingface.co/models/stablediffusionapi/disney-pixar-cartoon"
|
31 |
-
|
32 |
API_URL = "https://api-inference.huggingface.co/models/nerijs/pixel-art-xl"
|
33 |
-
|
34 |
API_URL = "https://api-inference.huggingface.co/models/openskyml/dalle-3-xl"
|
35 |
-
|
36 |
API_URL = "https://api-inference.huggingface.co/models/openskyml/midjourney-v4-xl"
|
37 |
|
38 |
API_TOKEN = os.environ.get("HF_READ_TOKEN")
|
|
|
18 |
|
19 |
def generate_txt2img(current_model, prompt, is_negative=False, image_style="None style", steps=50, cfg_scale=7,
|
20 |
seed=None):
|
21 |
+
if current_model == "SD-1.5":
|
22 |
API_URL = "https://api-inference.huggingface.co/models/runwayml/stable-diffusion-v1-5"
|
23 |
+
if current_model == "SDXL-1.0":
|
24 |
API_URL = "https://api-inference.huggingface.co/models/stabilityai/stable-diffusion-xl-base-1.0"
|
25 |
+
if current_model == "OpenJourney-V4":
|
26 |
API_URL = "https://api-inference.huggingface.co/models/prompthero/openjourney"
|
27 |
+
if current_model == "Anything-V4":
|
28 |
API_URL = "https://api-inference.huggingface.co/models/xyn-ai/anything-v4.0"
|
29 |
+
if current_model == "Disney-Pixar-Cartoon":
|
30 |
API_URL = "https://api-inference.huggingface.co/models/stablediffusionapi/disney-pixar-cartoon"
|
31 |
+
if current_model == "Pixel-Art-XL":
|
32 |
API_URL = "https://api-inference.huggingface.co/models/nerijs/pixel-art-xl"
|
33 |
+
if current_model == "Dalle-3-XL":
|
34 |
API_URL = "https://api-inference.huggingface.co/models/openskyml/dalle-3-xl"
|
35 |
+
if current_model == "Midjourney-V4-XL":
|
36 |
API_URL = "https://api-inference.huggingface.co/models/openskyml/midjourney-v4-xl"
|
37 |
|
38 |
API_TOKEN = os.environ.get("HF_READ_TOKEN")
|