Update app.py
Browse files
app.py
CHANGED
@@ -9,6 +9,19 @@ API_URL = "https://api-inference.huggingface.co/models/openskyml/dalle-3-xl"
|
|
9 |
API_TOKEN = os.getenv("HF_READ_TOKEN") # it is free
|
10 |
headers = {"Authorization": f"Bearer {API_TOKEN}"}
|
11 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
def query(prompt, is_negative=False, steps=1, cfg_scale=6, seed=None):
|
13 |
payload = {
|
14 |
"inputs": prompt,
|
|
|
9 |
API_TOKEN = os.getenv("HF_READ_TOKEN") # it is free
|
10 |
headers = {"Authorization": f"Bearer {API_TOKEN}"}
|
11 |
|
12 |
+
def select_model(model_name):
|
13 |
+
models_list = [
|
14 |
+
"openskyml/dalle-3-xl",
|
15 |
+
"Linaqruf/animagine-xl-2.0",
|
16 |
+
"Lykon/dreamshaper-7",
|
17 |
+
"Linaqruf/animagine-xl",
|
18 |
+
"runwayml/stable-diffusion-v1-5",
|
19 |
+
"stabilityai/stable-diffusion-xl-base-1.0",
|
20 |
+
"prompthero/openjourney-v4",
|
21 |
+
"nerijs/pixel-art-xl",
|
22 |
+
"Linaqruf/anything-v3.0"
|
23 |
+
]
|
24 |
+
|
25 |
def query(prompt, is_negative=False, steps=1, cfg_scale=6, seed=None):
|
26 |
payload = {
|
27 |
"inputs": prompt,
|