Rooni commited on
Commit
5133920
·
1 Parent(s): 5cbcb31

Update app.py

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