Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -9,24 +9,24 @@ import json
|
|
9 |
|
10 |
api_base = os.getenv("API_BASE")
|
11 |
mmodels = {
|
12 |
-
"DALL-E 3 XL":
|
13 |
-
"Playground 2":
|
14 |
-
"Openjourney 4":
|
15 |
-
"AbsoluteReality 1.8.1":
|
16 |
-
"Lyriel 1.6":
|
17 |
-
"Animagine XL 2.0":
|
18 |
-
"Counterfeit 2.5":
|
19 |
-
"Realistic Vision 5.1":
|
20 |
-
"Incursios 1.6":
|
21 |
-
"Anime Detailer XL":
|
22 |
-
"Vector Art XL":
|
23 |
-
"epiCRealism":
|
24 |
-
"PixelArt XL":
|
25 |
-
"NewReality XL":
|
26 |
-
"Anything 5.0":
|
27 |
-
"Disney":
|
28 |
-
"CleanLinearMix":
|
29 |
-
"Redmond SDXL":
|
30 |
}
|
31 |
timeout = 100
|
32 |
# PLEASE ❤ like ❤ this space. Please like me. I am 12 years old, one of my projects is: https://ai-hub.rf.gd . I live in Russia, I don't know English very well. Therefore, I apologize that there is only Russian here, but I think it will not be difficult to translate all this. (For example, using gpt)
|
@@ -108,7 +108,7 @@ def query(prompt, model, is_negative=False, steps=30, cfg_scale=7, sampler="DPM+
|
|
108 |
"strength": strength
|
109 |
}
|
110 |
|
111 |
-
response = requests.post(API_URL, headers=headers, json=payload, timeout=timeout)
|
112 |
if response.status_code != 200:
|
113 |
print(f"Ошибка: Не удалось получить изображение. Статус ответа: {response.status_code}")
|
114 |
print(f"Содержимое ответа: {response.text}")
|
|
|
9 |
|
10 |
api_base = os.getenv("API_BASE")
|
11 |
mmodels = {
|
12 |
+
"DALL-E 3 XL": "openskyml/dalle-3-xl",
|
13 |
+
"Playground 2": "playgroundai/playground-v2-1024px-aesthetic",
|
14 |
+
"Openjourney 4": "{api_base}prompthero/openjourney-v4",
|
15 |
+
"AbsoluteReality 1.8.1": "digiplay/AbsoluteReality_v1.8.1",
|
16 |
+
"Lyriel 1.6": "stablediffusionapi/lyrielv16",
|
17 |
+
"Animagine XL 2.0": "Linaqruf/animagine-xl-2.0",
|
18 |
+
"Counterfeit 2.5": "gsdf/Counterfeit-V2.5",
|
19 |
+
"Realistic Vision 5.1": "stablediffusionapi/realistic-vision-v51",
|
20 |
+
"Incursios 1.6": "digiplay/incursiosMemeDiffusion_v1.6",
|
21 |
+
"Anime Detailer XL": "Linaqruf/anime-detailer-xl-lora",
|
22 |
+
"Vector Art XL": "DoctorDiffusion/doctor-diffusion-s-controllable-vector-art-xl-lora",
|
23 |
+
"epiCRealism": "emilianJR/epiCRealism",
|
24 |
+
"PixelArt XL": "nerijs/pixel-art-xl",
|
25 |
+
"NewReality XL": "stablediffusionapi/newrealityxl-global-nsfw",
|
26 |
+
"Anything 5.0": "hogiahien/anything-v5-edited",
|
27 |
+
"Disney": "goofyai/disney_style_xl",
|
28 |
+
"CleanLinearMix": "digiplay/CleanLinearMix_nsfw",
|
29 |
+
"Redmond SDXL": "artificialguybr/LogoRedmond-LogoLoraForSDXL-V2"
|
30 |
}
|
31 |
timeout = 100
|
32 |
# PLEASE ❤ like ❤ this space. Please like me. I am 12 years old, one of my projects is: https://ai-hub.rf.gd . I live in Russia, I don't know English very well. Therefore, I apologize that there is only Russian here, but I think it will not be difficult to translate all this. (For example, using gpt)
|
|
|
108 |
"strength": strength
|
109 |
}
|
110 |
|
111 |
+
response = requests.post(f"{api_base}API_URL", headers=headers, json=payload, timeout=timeout)
|
112 |
if response.status_code != 200:
|
113 |
print(f"Ошибка: Не удалось получить изображение. Статус ответа: {response.status_code}")
|
114 |
print(f"Содержимое ответа: {response.text}")
|