Update app.py
Browse files
app.py
CHANGED
@@ -1,20 +1,19 @@
|
|
1 |
import gradio as gr
|
2 |
import requests
|
3 |
|
4 |
-
|
5 |
# Базовые настройки
|
6 |
prompt = gr.Textbox(label="Prompt")
|
7 |
-
models = gr.
|
8 |
|
9 |
# Расширенные настройки
|
10 |
negative_prompt = gr.Textbox(label="Negative Prompt")
|
11 |
-
sampling_method = gr.
|
12 |
sampling_steps = gr.Number(label="Sampling Steps", min=1, max=1000, default=100)
|
13 |
cfg_scale = gr.Number(label="CFG Scale", min=0.1, max=10.0, default=1.0)
|
14 |
seed = gr.Number(label="Seed", min=0, max=2**31, default=0)
|
15 |
|
16 |
# Улучшение качества
|
17 |
-
algorithm = gr.
|
18 |
|
19 |
# Функция генерации изображения
|
20 |
def generate_image(prompt, model, negative_prompt, sampling_method, sampling_steps, cfg_scale, seed):
|
|
|
1 |
import gradio as gr
|
2 |
import requests
|
3 |
|
|
|
4 |
# Базовые настройки
|
5 |
prompt = gr.Textbox(label="Prompt")
|
6 |
+
models = gr.Radio(options=["Bard", "DALL-E 2", "VQGAN+CLIP", "VQGAN", "CLIP", "InceptionV3"], label="Model")
|
7 |
|
8 |
# Расширенные настройки
|
9 |
negative_prompt = gr.Textbox(label="Negative Prompt")
|
10 |
+
sampling_method = gr.Radio(options=["random", "greedy", "nucleus", "top_k", "top_p"], label="Sampling Method")
|
11 |
sampling_steps = gr.Number(label="Sampling Steps", min=1, max=1000, default=100)
|
12 |
cfg_scale = gr.Number(label="CFG Scale", min=0.1, max=10.0, default=1.0)
|
13 |
seed = gr.Number(label="Seed", min=0, max=2**31, default=0)
|
14 |
|
15 |
# Улучшение качества
|
16 |
+
algorithm = gr.Radio(options=["nearest", "bilinear", "bicubic", "lanczos", "cubic", "mitchell"], label="Algorithm")
|
17 |
|
18 |
# Функция генерации изображения
|
19 |
def generate_image(prompt, model, negative_prompt, sampling_method, sampling_steps, cfg_scale, seed):
|