Rooni commited on
Commit
7d1bd87
·
1 Parent(s): cdb7911

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -10
app.py CHANGED
@@ -42,22 +42,28 @@ def render(prompt, model, negative_prompt, width, height, guidance, seed, upscal
42
 
43
  # Создаем компоненты для ввода данных
44
  prompt_textbox = gr.Textbox(lines=3, placeholder="Введите описание изображения", label="Описание изображения:")
45
- model_radio = gr.Radio(choices=model_list, label="Модель:", value="Anything V5", type="value")
46
 
47
  negative_prompt_textbox = gr.Textbox(lines=3, placeholder="Введите Negative Prompt", label="Negative Prompt:")
48
- width_slider = gr.Slider(minimum=256, maximum=2048, value=512, label="Ширина:")
49
- height_slider = gr.Slider(minimum=256, maximum=2048, value=512, label="Высота:")
50
- guidance_slider = gr.Slider(minimum=1, maximum=20, value=7.5, label="CFG Scale:")
51
- seed_slider = gr.Slider(minimum=-1, maximum=1000000, value=-1, label="Seed:")
52
- upscale_dropdown = gr.Dropdown(choices=["yes", "no"], label="Upscale", value="no")
53
-
54
- input_component_1 = [prompt_textbox, model_radio]
55
- input_component_2 = [negative_prompt_textbox, width_slider, height_slider, guidance_slider, seed_slider, upscale_dropdown]
56
 
57
  # Создаем интерфейс
58
  iface = gr.Interface(
59
  fn=render,
60
- inputs=[input_component_1, input_component_2],
 
 
 
 
 
 
 
 
 
61
  outputs=gr.Image(),
62
  )
63
 
 
42
 
43
  # Создаем компоненты для ввода данных
44
  prompt_textbox = gr.Textbox(lines=3, placeholder="Введите описание изображения", label="Описание изображения:")
45
+ model_radio = gr.Radio(choices=model_list, label="Модель:", default="Anything V5", type="value")
46
 
47
  negative_prompt_textbox = gr.Textbox(lines=3, placeholder="Введите Negative Prompt", label="Negative Prompt:")
48
+ width_slider = gr.Slider(minimum=256, maximum=2048, default=512, label="Ширина:")
49
+ height_slider = gr.Slider(minimum=256, maximum=2048, default=512, label="Высота:")
50
+ guidance_slider = gr.Slider(minimum=1, maximum=20, default=7.5, label="CFG Scale:")
51
+ seed_slider = gr.Slider(minimum=-1, maximum=1000000, default=-1, label="Seed:")
52
+ upscale_dropdown = gr.Dropdown(choices=["yes", "no"], label="Upscale", default="no")
 
 
 
53
 
54
  # Создаем интерфейс
55
  iface = gr.Interface(
56
  fn=render,
57
+ inputs=[
58
+ prompt_textbox,
59
+ model_radio,
60
+ negative_prompt_textbox,
61
+ width_slider,
62
+ height_slider,
63
+ guidance_slider,
64
+ seed_slider,
65
+ upscale_dropdown,
66
+ ],
67
  outputs=gr.Image(),
68
  )
69