Lisandro commited on
Commit
1cadc23
·
1 Parent(s): c53e7e5

feat: Mejorar opciones avanzadas de refinamiento de imágenes en app.py

Browse files
Files changed (1) hide show
  1. app.py +32 -31
app.py CHANGED
@@ -22,37 +22,38 @@ with gr.Blocks() as demo:
22
  with gr.Row():
23
  with gr.Column():
24
  image = gr.Image(type="filepath")
25
- prompt = gr.Textbox(lines=3, label="Prompt")
26
- negative_prompt = gr.Textbox(lines=3, label="Negative Prompt")
27
- strength = gr.Slider(
28
- label="Strength",
29
- minimum=0,
30
- maximum=300,
31
- step=0.01,
32
- value=1
33
- )
34
- num_inference_steps = gr.Slider(
35
- label="Inference steps",
36
- minimum=3,
37
- maximum=150,
38
- step=1,
39
- value=25
40
- )
41
- guidance_scale = gr.Slider(
42
- label="Guidance scale",
43
- minimum=0.0,
44
- maximum=50.0,
45
- step=0.1,
46
- value=12
47
- )
48
- seed = gr.Slider(
49
- label="Seed",
50
- info="-1 denotes a random seed",
51
- minimum=-1,
52
- maximum=423538377342,
53
- step=1,
54
- value=-1
55
- )
 
56
  refine_btn = gr.Button("Refine")
57
  with gr.Column():
58
  output = ImageSlider(label="Before / After")
 
22
  with gr.Row():
23
  with gr.Column():
24
  image = gr.Image(type="filepath")
25
+ with gr.Accordion("Advanced Options", open=False):
26
+ prompt = gr.Textbox(lines=3, label="Prompt")
27
+ negative_prompt = gr.Textbox(lines=3, label="Negative Prompt")
28
+ strength = gr.Slider(
29
+ label="Strength",
30
+ minimum=0,
31
+ maximum=300,
32
+ step=0.01,
33
+ value=1
34
+ )
35
+ num_inference_steps = gr.Slider(
36
+ label="Inference steps",
37
+ minimum=3,
38
+ maximum=150,
39
+ step=1,
40
+ value=25
41
+ )
42
+ guidance_scale = gr.Slider(
43
+ label="Guidance scale",
44
+ minimum=0.0,
45
+ maximum=50.0,
46
+ step=0.1,
47
+ value=12
48
+ )
49
+ seed = gr.Slider(
50
+ label="Seed",
51
+ info="-1 denotes a random seed",
52
+ minimum=-1,
53
+ maximum=423538377342,
54
+ step=1,
55
+ value=-1
56
+ )
57
  refine_btn = gr.Button("Refine")
58
  with gr.Column():
59
  output = ImageSlider(label="Before / After")