Spaces:
Running
Running
Commit
·
7fc4e5d
1
Parent(s):
c7811fb
Update app.py
Browse files
app.py
CHANGED
@@ -9,7 +9,7 @@ from PIL import Image
|
|
9 |
list_models = [
|
10 |
"SDXL-1.0", "SD-1.5", "OpenJourney-V4", "Anything-V4",
|
11 |
"Disney-Pixar-Cartoon", "Pixel-Art-XL", "Dalle-3-XL",
|
12 |
-
"Midjourney-V4-XL", "
|
13 |
]
|
14 |
|
15 |
# Function to generate images from text
|
@@ -31,8 +31,8 @@ def generate_txt2img(current_model, prompt, is_negative=False, image_style="None
|
|
31 |
API_URL = "https://api-inference.huggingface.co/models/openskyml/dalle-3-xl"
|
32 |
elif current_model == "Midjourney-V4-XL":
|
33 |
API_URL = "https://api-inference.huggingface.co/models/openskyml/midjourney-v4-xl"
|
34 |
-
elif current_model == "
|
35 |
-
API_URL = "https://api-inference.huggingface.co/models/
|
36 |
|
37 |
API_TOKEN = os.environ.get("HF_READ_TOKEN")
|
38 |
headers = {"Authorization": f"Bearer {API_TOKEN}"}
|
|
|
9 |
list_models = [
|
10 |
"SDXL-1.0", "SD-1.5", "OpenJourney-V4", "Anything-V4",
|
11 |
"Disney-Pixar-Cartoon", "Pixel-Art-XL", "Dalle-3-XL",
|
12 |
+
"Midjourney-V4-XL", "Open-diffusion-v1",
|
13 |
]
|
14 |
|
15 |
# Function to generate images from text
|
|
|
31 |
API_URL = "https://api-inference.huggingface.co/models/openskyml/dalle-3-xl"
|
32 |
elif current_model == "Midjourney-V4-XL":
|
33 |
API_URL = "https://api-inference.huggingface.co/models/openskyml/midjourney-v4-xl"
|
34 |
+
elif current_model == "Open-diffusion-v1":
|
35 |
+
API_URL = "https://api-inference.huggingface.co/models/openskyml/open-diffusion-v1"
|
36 |
|
37 |
API_TOKEN = os.environ.get("HF_READ_TOKEN")
|
38 |
headers = {"Authorization": f"Bearer {API_TOKEN}"}
|