Update app.py
Browse files
app.py
CHANGED
@@ -22,8 +22,16 @@ def query(prompt, model, is_negative=False, steps=20, cfg_scale=7, seed=None):
|
|
22 |
API_URL = "https://api-inference.huggingface.co/models/openskyml/dalle-3-xl"
|
23 |
if model == 'Playground v2':
|
24 |
API_URL = "https://api-inference.huggingface.co/models/playgroundai/playground-v2-1024px-aesthetic"
|
25 |
-
if model == 'Openjourney':
|
26 |
-
API_URL = "https://api-inference.huggingface.co/models/prompthero/openjourney"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
|
28 |
payload = {
|
29 |
"inputs": prompt,
|
@@ -47,7 +55,7 @@ with gr.Blocks(css=css) as dalle:
|
|
47 |
with gr.Row():
|
48 |
with gr.Column(elem_id="prompt-container"):
|
49 |
text_prompt = gr.Textbox(label="Prompt", placeholder="Описание изображения", lines=3, elem_id="prompt-text-input")
|
50 |
-
model = gr.Radio(label="Модель", value="DALL-E 3 XL", choices=["DALL-E 3 XL", "Playground v2", "Openjourney"])
|
51 |
|
52 |
|
53 |
with gr.Tab("Расширенные настройки"):
|
|
|
22 |
API_URL = "https://api-inference.huggingface.co/models/openskyml/dalle-3-xl"
|
23 |
if model == 'Playground v2':
|
24 |
API_URL = "https://api-inference.huggingface.co/models/playgroundai/playground-v2-1024px-aesthetic"
|
25 |
+
if model == 'Openjourney v4':
|
26 |
+
API_URL = "https://api-inference.huggingface.co/models/prompthero/openjourney-v4"
|
27 |
+
if model == 'Anything V5':
|
28 |
+
API_URL = "https://api-inference.huggingface.co/models/hogiahien/anything-v5-edited"
|
29 |
+
if model == 'AbsoluteReality v1.8.1':
|
30 |
+
API_URL = "Dreamshaper v8"
|
31 |
+
if model == 'https://api-inference.huggingface.co/models/Lykon/dreamshaper-8':
|
32 |
+
API_URL = "link"
|
33 |
+
if model == 'Lyriel 1.6':
|
34 |
+
API_URL = "https://api-inference.huggingface.co/models/stablediffusionapi/lyrielv16"
|
35 |
|
36 |
payload = {
|
37 |
"inputs": prompt,
|
|
|
55 |
with gr.Row():
|
56 |
with gr.Column(elem_id="prompt-container"):
|
57 |
text_prompt = gr.Textbox(label="Prompt", placeholder="Описание изображения", lines=3, elem_id="prompt-text-input")
|
58 |
+
model = gr.Radio(label="Модель", value="DALL-E 3 XL", choices=["AbsoluteReality v1.8.1", "DALL-E 3 XL", "Playground v2", "Openjourney v4", "Anything V5", "Dreamshaper v8", "Lyriel 1.6"])
|
59 |
|
60 |
|
61 |
with gr.Tab("Расширенные настройки"):
|