Spaces:
Runtime error
Runtime error
Cleanup layout (#15)
Browse files- Cleanup layout (bfa2724c330a834d445d0add7997f8c58ea45529)
Co-authored-by: Ali Abid <[email protected]>
app.py
CHANGED
@@ -124,7 +124,7 @@ with gr.Blocks(css='style.css') as demo:
|
|
124 |
gr.DuplicateButton(value='Duplicate Space for private use',
|
125 |
elem_id='duplicate-button',
|
126 |
visible=os.getenv('SHOW_DUPLICATE_BUTTON') == '1')
|
127 |
-
with gr.
|
128 |
with gr.Row():
|
129 |
prompt = gr.Text(
|
130 |
label='Prompt',
|
@@ -135,80 +135,80 @@ with gr.Blocks(css='style.css') as demo:
|
|
135 |
)
|
136 |
run_button = gr.Button('Run', scale=0)
|
137 |
result = gr.Image(label='Result', show_label=False)
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
156 |
)
|
157 |
-
|
158 |
-
label='
|
159 |
-
|
160 |
-
|
161 |
-
|
|
|
162 |
)
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
maximum=20,
|
191 |
-
step=0.1,
|
192 |
-
value=5.0)
|
193 |
-
num_inference_steps_base = gr.Slider(
|
194 |
-
label='Number of inference steps for base',
|
195 |
-
minimum=10,
|
196 |
-
maximum=100,
|
197 |
-
step=1,
|
198 |
-
value=50)
|
199 |
-
with gr.Row(visible=False) as refiner_params:
|
200 |
-
guidance_scale_refiner = gr.Slider(
|
201 |
-
label='Guidance scale for refiner',
|
202 |
-
minimum=1,
|
203 |
-
maximum=20,
|
204 |
-
step=0.1,
|
205 |
-
value=5.0)
|
206 |
-
num_inference_steps_refiner = gr.Slider(
|
207 |
-
label='Number of inference steps for refiner',
|
208 |
-
minimum=10,
|
209 |
-
maximum=100,
|
210 |
-
step=1,
|
211 |
-
value=50)
|
212 |
|
213 |
gr.Examples(examples=examples,
|
214 |
inputs=prompt,
|
|
|
124 |
gr.DuplicateButton(value='Duplicate Space for private use',
|
125 |
elem_id='duplicate-button',
|
126 |
visible=os.getenv('SHOW_DUPLICATE_BUTTON') == '1')
|
127 |
+
with gr.Group():
|
128 |
with gr.Row():
|
129 |
prompt = gr.Text(
|
130 |
label='Prompt',
|
|
|
135 |
)
|
136 |
run_button = gr.Button('Run', scale=0)
|
137 |
result = gr.Image(label='Result', show_label=False)
|
138 |
+
with gr.Accordion('Advanced options', open=False):
|
139 |
+
with gr.Row():
|
140 |
+
use_negative_prompt = gr.Checkbox(label='Use negative prompt',
|
141 |
+
value=False)
|
142 |
+
use_prompt_2 = gr.Checkbox(label='Use prompt 2', value=False)
|
143 |
+
use_negative_prompt_2 = gr.Checkbox(
|
144 |
+
label='Use negative prompt 2', value=False)
|
145 |
+
negative_prompt = gr.Text(
|
146 |
+
label='Negative prompt',
|
147 |
+
max_lines=1,
|
148 |
+
placeholder='Enter a negative prompt',
|
149 |
+
visible=False,
|
150 |
+
)
|
151 |
+
prompt_2 = gr.Text(
|
152 |
+
label='Prompt 2',
|
153 |
+
max_lines=1,
|
154 |
+
placeholder='Enter your prompt',
|
155 |
+
visible=False,
|
156 |
+
)
|
157 |
+
negative_prompt_2 = gr.Text(
|
158 |
+
label='Negative prompt 2',
|
159 |
+
max_lines=1,
|
160 |
+
placeholder='Enter a negative prompt',
|
161 |
+
visible=False,
|
162 |
+
)
|
163 |
+
|
164 |
+
seed = gr.Slider(label='Seed',
|
165 |
+
minimum=0,
|
166 |
+
maximum=MAX_SEED,
|
167 |
+
step=1,
|
168 |
+
value=0)
|
169 |
+
randomize_seed = gr.Checkbox(label='Randomize seed', value=True)
|
170 |
+
with gr.Row():
|
171 |
+
width = gr.Slider(
|
172 |
+
label='Width',
|
173 |
+
minimum=256,
|
174 |
+
maximum=MAX_IMAGE_SIZE,
|
175 |
+
step=32,
|
176 |
+
value=1024,
|
177 |
)
|
178 |
+
height = gr.Slider(
|
179 |
+
label='Height',
|
180 |
+
minimum=256,
|
181 |
+
maximum=MAX_IMAGE_SIZE,
|
182 |
+
step=32,
|
183 |
+
value=1024,
|
184 |
)
|
185 |
+
apply_refiner = gr.Checkbox(label='Apply refiner', value=False)
|
186 |
+
with gr.Row():
|
187 |
+
guidance_scale_base = gr.Slider(
|
188 |
+
label='Guidance scale for base',
|
189 |
+
minimum=1,
|
190 |
+
maximum=20,
|
191 |
+
step=0.1,
|
192 |
+
value=5.0)
|
193 |
+
num_inference_steps_base = gr.Slider(
|
194 |
+
label='Number of inference steps for base',
|
195 |
+
minimum=10,
|
196 |
+
maximum=100,
|
197 |
+
step=1,
|
198 |
+
value=50)
|
199 |
+
with gr.Row(visible=False) as refiner_params:
|
200 |
+
guidance_scale_refiner = gr.Slider(
|
201 |
+
label='Guidance scale for refiner',
|
202 |
+
minimum=1,
|
203 |
+
maximum=20,
|
204 |
+
step=0.1,
|
205 |
+
value=5.0)
|
206 |
+
num_inference_steps_refiner = gr.Slider(
|
207 |
+
label='Number of inference steps for refiner',
|
208 |
+
minimum=10,
|
209 |
+
maximum=100,
|
210 |
+
step=1,
|
211 |
+
value=50)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
212 |
|
213 |
gr.Examples(examples=examples,
|
214 |
inputs=prompt,
|