Venkateshwar Reddy commited on
Commit
20901f0
·
1 Parent(s): 6603ea2

Modified UI for Gradio

Browse files
Files changed (1) hide show
  1. app.py +57 -57
app.py CHANGED
@@ -56,81 +56,81 @@ with gr.Blocks(css=css) as demo:
56
 
57
  with gr.Row():
58
 
59
- prompt = gr.Text(
60
- label="Prompt: (wont use)",
61
- show_label=False,
62
- max_lines=1,
63
- placeholder="Enter your prompt",
64
- container=False,
65
- )
66
 
67
  run_button = gr.Button("Run", scale=0)
68
 
69
  result = gr.Image(label="Result", show_label=False)
70
 
71
- with gr.Accordion("Advanced Settings", open=False):
72
 
73
- negative_prompt = gr.Text(
74
- label="Negative prompt",
75
- max_lines=1,
76
- placeholder="Enter a negative prompt",
77
- visible=False,
78
- )
79
 
80
- seed = gr.Slider(
81
- label="Seed",
82
- minimum=0,
83
- maximum=MAX_SEED,
84
- step=1,
85
- value=0,
86
- )
87
 
88
- randomize_seed = gr.Checkbox(label="Randomize seed", value=True)
89
 
90
- with gr.Row():
91
 
92
- width = gr.Slider(
93
- label="Width",
94
- minimum=256,
95
- maximum=MAX_IMAGE_SIZE,
96
- step=32,
97
- value=512,
98
- )
99
 
100
- height = gr.Slider(
101
- label="Height",
102
- minimum=256,
103
- maximum=MAX_IMAGE_SIZE,
104
- step=32,
105
- value=512,
106
- )
107
 
108
- with gr.Row():
109
 
110
- guidance_scale = gr.Slider(
111
- label="Guidance scale",
112
- minimum=0.0,
113
- maximum=10.0,
114
- step=0.1,
115
- value=0.0,
116
- )
117
 
118
- num_inference_steps = gr.Slider(
119
- label="Number of inference steps",
120
- minimum=1,
121
- maximum=120,
122
- step=1,
123
- value=2,
124
- )
125
 
126
- gr.Examples(
127
- examples = examples,
128
- inputs = [prompt]
129
- )
130
 
131
  run_button.click(
132
  fn = infer,
133
- inputs = [prompt, negative_prompt, seed, randomize_seed, width, height, guidance_scale, num_inference_steps],
134
  outputs = [result]
135
  )
136
 
 
56
 
57
  with gr.Row():
58
 
59
+ num_inference_steps = gr.Slider(
60
+ label="Number of inference steps",
61
+ minimum=1,
62
+ maximum=20,
63
+ step=1,
64
+ value=6,
65
+ )
66
 
67
  run_button = gr.Button("Run", scale=0)
68
 
69
  result = gr.Image(label="Result", show_label=False)
70
 
71
+ # with gr.Accordion("Advanced Settings", open=False):
72
 
73
+ # negative_prompt = gr.Text(
74
+ # label="Negative prompt",
75
+ # max_lines=1,
76
+ # placeholder="Enter a negative prompt",
77
+ # visible=False,
78
+ # )
79
 
80
+ # seed = gr.Slider(
81
+ # label="Seed",
82
+ # minimum=0,
83
+ # maximum=MAX_SEED,
84
+ # step=1,
85
+ # value=0,
86
+ # )
87
 
88
+ # randomize_seed = gr.Checkbox(label="Randomize seed", value=True)
89
 
90
+ # with gr.Row():
91
 
92
+ # width = gr.Slider(
93
+ # label="Width",
94
+ # minimum=256,
95
+ # maximum=MAX_IMAGE_SIZE,
96
+ # step=32,
97
+ # value=512,
98
+ # )
99
 
100
+ # height = gr.Slider(
101
+ # label="Height",
102
+ # minimum=256,
103
+ # maximum=MAX_IMAGE_SIZE,
104
+ # step=32,
105
+ # value=512,
106
+ # )
107
 
108
+ # with gr.Row():
109
 
110
+ # guidance_scale = gr.Slider(
111
+ # label="Guidance scale",
112
+ # minimum=0.0,
113
+ # maximum=10.0,
114
+ # step=0.1,
115
+ # value=0.0,
116
+ # )
117
 
118
+ # num_inference_steps = gr.Slider(
119
+ # label="Number of inference steps",
120
+ # minimum=1,
121
+ # maximum=120,
122
+ # step=1,
123
+ # value=2,
124
+ # )
125
 
126
+ # gr.Examples(
127
+ # examples = examples,
128
+ # inputs = [prompt]
129
+ # )
130
 
131
  run_button.click(
132
  fn = infer,
133
+ inputs = [ num_inference_steps],
134
  outputs = [result]
135
  )
136