Rooni commited on
Commit
4d82ed4
·
1 Parent(s): c1f0c54

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -19
app.py CHANGED
@@ -9,24 +9,24 @@ import json
9
 
10
  api_base = os.getenv("API_BASE")
11
  mmodels = {
12
- "DALL-E 3 XL": f"{api_base}openskyml/dalle-3-xl",
13
- "Playground 2": f"{api_base}playgroundai/playground-v2-1024px-aesthetic",
14
- "Openjourney 4": f"{api_base}prompthero/openjourney-v4",
15
- "AbsoluteReality 1.8.1": f"{api_base}digiplay/AbsoluteReality_v1.8.1",
16
- "Lyriel 1.6": f"{api_base}stablediffusionapi/lyrielv16",
17
- "Animagine XL 2.0": f"{api_base}Linaqruf/animagine-xl-2.0",
18
- "Counterfeit 2.5": f"{api_base}gsdf/Counterfeit-V2.5",
19
- "Realistic Vision 5.1": f"{api_base}stablediffusionapi/realistic-vision-v51",
20
- "Incursios 1.6": f"{api_base}digiplay/incursiosMemeDiffusion_v1.6",
21
- "Anime Detailer XL": f"{api_base}Linaqruf/anime-detailer-xl-lora",
22
- "Vector Art XL": f"{api_base}DoctorDiffusion/doctor-diffusion-s-controllable-vector-art-xl-lora",
23
- "epiCRealism": f"{api_base}emilianJR/epiCRealism",
24
- "PixelArt XL": f"{api_base}nerijs/pixel-art-xl",
25
- "NewReality XL": f"{api_base}stablediffusionapi/newrealityxl-global-nsfw",
26
- "Anything 5.0": f"{api_base}hogiahien/anything-v5-edited",
27
- "Disney": f"{api_base}goofyai/disney_style_xl",
28
- "CleanLinearMix": f"{api_base}digiplay/CleanLinearMix_nsfw",
29
- "Redmond SDXL": f"{api_base}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,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}")