Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -22,6 +22,12 @@ 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 |
|
26 |
payload = {
|
27 |
"inputs": prompt,
|
@@ -45,7 +51,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", "Playground v2"])
|
49 |
|
50 |
|
51 |
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 == 'SD-XL 1.0':
|
26 |
+
API_URL = "https://api-inference.huggingface.co/models/stabilityai/stable-diffusion-xl-base-1.0"
|
27 |
+
if model == 'PixArt':
|
28 |
+
API_URL = "https://api-inference.huggingface.co/models/PixArt-alpha/PixArt-LCM-XL-2-1024-MS"
|
29 |
+
if model == 'Kandinsky 3':
|
30 |
+
API_URL = "https://api-inference.huggingface.co/models/kandinsky-community/kandinsky-3"
|
31 |
|
32 |
payload = {
|
33 |
"inputs": prompt,
|
|
|
51 |
with gr.Row():
|
52 |
with gr.Column(elem_id="prompt-container"):
|
53 |
text_prompt = gr.Textbox(label="Prompt", placeholder="Описание изображения", lines=3, elem_id="prompt-text-input")
|
54 |
+
model = gr.Radio(label="Модель", value="DALL-E 3 XL", choices=["DALL-E 3 XL", "Playground v2", "D-XL 1.0", "PixArt", "Kandinsky 3"])
|
55 |
|
56 |
|
57 |
with gr.Tab("Расширенные настройки"):
|