Mathdesenvnonimate commited on
Commit
77a21c1
1 Parent(s): e880072

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -4
app.py CHANGED
@@ -6,20 +6,27 @@ import os
6
  from PIL import Image
7
 
8
  # List of available models
 
9
  list_models = [
10
  "SDXL 1.0", "SD 1.5", "OpenJourney", "Anything V4.0",
11
  "Disney Pixar Cartoon", "Pixel Art XL", "Dalle 3 XL",
12
  "Midjourney V4 XL", "Open Diffusion V1", "SSD 1B",
13
  "Segmind Vega", "Animagine XL-2.0", "FunkoPOP",
14
  ]
 
 
 
 
 
15
 
16
  # Function to generate images from text
17
  def generate_txt2img(current_model, prompt, is_negative=False, image_style="None style", steps=50, cfg_scale=7, seed=None):
18
 
19
- if current_model == "SD 1.5":
 
 
20
  API_URL = "https://api-inference.huggingface.co/models/runwayml/stable-diffusion-v1-5"
21
- elif current_model == "SDXL 1.0":
22
- API_URL = "https://api-inference.huggingface.co/models/stabilityai/stable-diffusion-xl-base-1.0"
23
  elif current_model == "OpenJourney":
24
  API_URL = "https://api-inference.huggingface.co/models/prompthero/openjourney"
25
  elif current_model == "Anything V4.0":
@@ -42,7 +49,7 @@ def generate_txt2img(current_model, prompt, is_negative=False, image_style="None
42
  API_URL = "https://api-inference.huggingface.co/models/Linaqruf/animagine-xl-2.0"
43
  elif current_model == "FunkoPOP":
44
  API_URL = "https://api-inference.huggingface.co/models/ProomptEngineer/pe-funko-pop-diffusion-style"
45
-
46
  API_TOKEN = os.environ.get("HF_READ_TOKEN")
47
  headers = {"Authorization": f"Bearer {API_TOKEN}"}
48
 
 
6
  from PIL import Image
7
 
8
  # List of available models
9
+ """
10
  list_models = [
11
  "SDXL 1.0", "SD 1.5", "OpenJourney", "Anything V4.0",
12
  "Disney Pixar Cartoon", "Pixel Art XL", "Dalle 3 XL",
13
  "Midjourney V4 XL", "Open Diffusion V1", "SSD 1B",
14
  "Segmind Vega", "Animagine XL-2.0", "FunkoPOP",
15
  ]
16
+ """
17
+
18
+ list_models = [
19
+ "FunkoPOP", "SD 1.5",
20
+ ]
21
 
22
  # Function to generate images from text
23
  def generate_txt2img(current_model, prompt, is_negative=False, image_style="None style", steps=50, cfg_scale=7, seed=None):
24
 
25
+ if current_model == "FunkoPOP":
26
+ API_URL = "https://api-inference.huggingface.co/models/ProomptEngineer/pe-funko-pop-diffusion-style"
27
+ elif current_model == "SD 1.5":
28
  API_URL = "https://api-inference.huggingface.co/models/runwayml/stable-diffusion-v1-5"
29
+ """
 
30
  elif current_model == "OpenJourney":
31
  API_URL = "https://api-inference.huggingface.co/models/prompthero/openjourney"
32
  elif current_model == "Anything V4.0":
 
49
  API_URL = "https://api-inference.huggingface.co/models/Linaqruf/animagine-xl-2.0"
50
  elif current_model == "FunkoPOP":
51
  API_URL = "https://api-inference.huggingface.co/models/ProomptEngineer/pe-funko-pop-diffusion-style"
52
+ """
53
  API_TOKEN = os.environ.get("HF_READ_TOKEN")
54
  headers = {"Authorization": f"Bearer {API_TOKEN}"}
55