Rooni commited on
Commit
aeb71ff
·
1 Parent(s): ff1df2a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -4
app.py CHANGED
@@ -1,9 +1,6 @@
1
  import gradio as gr
2
  import requests
3
 
4
- def create_number_component(label, value, min_val, max_val):
5
- return gr.Number(label=label, value=value, min=min_val, max=max_val)
6
-
7
  # Базовые настройки
8
  prompt = gr.Textbox(label="Prompt")
9
  models = gr.Radio(
@@ -16,7 +13,12 @@ negative_prompt = gr.Textbox(label="Negative Prompt")
16
  sampling_method = gr.Radio(
17
  ["random", "greedy", "nucleus", "top_k", "top_p"], label="Sampling Method"
18
  )
19
- sampling_steps = create_number_component(label="Sampling Steps", value=100, min_val=1, max_val=1000)
 
 
 
 
 
20
  cfg_scale = gr.Number(label="CFG Scale", min=0.1, max=10.0, default=1.0)
21
  seed = gr.Number(label="Seed", min=0, max=2**31, default=0)
22
 
 
1
  import gradio as gr
2
  import requests
3
 
 
 
 
4
  # Базовые настройки
5
  prompt = gr.Textbox(label="Prompt")
6
  models = gr.Radio(
 
13
  sampling_method = gr.Radio(
14
  ["random", "greedy", "nucleus", "top_k", "top_p"], label="Sampling Method"
15
  )
16
+ sampling_steps = gr.Number(
17
+ label="Sampling Steps",
18
+ value=100,
19
+ min_val=1,
20
+ max_val=1000,
21
+ )
22
  cfg_scale = gr.Number(label="CFG Scale", min=0.1, max=10.0, default=1.0)
23
  seed = gr.Number(label="Seed", min=0, max=2**31, default=0)
24