Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -22,10 +22,8 @@ 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 == '
|
26 |
-
API_URL = "https://api-inference.huggingface.co/models/
|
27 |
-
if model == 'PixArt':
|
28 |
-
API_URL = "https://api-inference.huggingface.co/models/PixArt-alpha/PixArt-LCM-XL-2-1024-MS"
|
29 |
|
30 |
payload = {
|
31 |
"inputs": prompt,
|
@@ -49,7 +47,7 @@ with gr.Blocks(css=css) as dalle:
|
|
49 |
with gr.Row():
|
50 |
with gr.Column(elem_id="prompt-container"):
|
51 |
text_prompt = gr.Textbox(label="Prompt", placeholder="Описание изображения", lines=3, elem_id="prompt-text-input")
|
52 |
-
model = gr.Radio(label="Модель", value="DALL-E 3 XL", choices=["DALL-E 3 XL", "Playground v2", "
|
53 |
|
54 |
|
55 |
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':
|
26 |
+
API_URL = "https://api-inference.huggingface.co/models/prompthero/openjourney"
|
|
|
|
|
27 |
|
28 |
payload = {
|
29 |
"inputs": prompt,
|
|
|
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("Расширенные настройки"):
|