Update app.py
Browse files
app.py
CHANGED
@@ -20,8 +20,8 @@ def query(prompt, model, is_negative=False, steps=20, cfg_scale=7, seed=None):
|
|
20 |
|
21 |
if model == 'DALL-E 3 XL':
|
22 |
API_URL = "https://api-inference.huggingface.co/models/openskyml/dalle-3-xl"
|
23 |
-
if model == '
|
24 |
-
API_URL = "https://api-inference.huggingface.co/models/
|
25 |
|
26 |
payload = {
|
27 |
"inputs": prompt,
|
@@ -45,7 +45,7 @@ with gr.Blocks(css=css) as dalle:
|
|
45 |
with gr.Row():
|
46 |
with gr.Column(elem_id="prompt-container"):
|
47 |
text_prompt = gr.Textbox(label="Prompt", placeholder="Описание изображения", lines=3, elem_id="prompt-text-input")
|
48 |
-
model = gr.Radio(label="Модель", value="DALL-E 3 XL", choices=["DALL-E 3 XL", "
|
49 |
|
50 |
|
51 |
with gr.Tab("Расширенные настройки"):
|
|
|
20 |
|
21 |
if model == 'DALL-E 3 XL':
|
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 |
|
26 |
payload = {
|
27 |
"inputs": prompt,
|
|
|
45 |
with gr.Row():
|
46 |
with gr.Column(elem_id="prompt-container"):
|
47 |
text_prompt = gr.Textbox(label="Prompt", placeholder="Описание изображения", lines=3, elem_id="prompt-text-input")
|
48 |
+
model = gr.Radio(label="Модель", value="DALL-E 3 XL", choices=["DALL-E 3 XL", "Playground v2"])
|
49 |
|
50 |
|
51 |
with gr.Tab("Расширенные настройки"):
|