NightRaven109 commited on
Commit
cea71a2
·
verified ·
1 Parent(s): 27b77c5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -13
app.py CHANGED
@@ -205,18 +205,21 @@ with gr.Blocks(title="Controllable Conditional Super-Resolution") as demo:
205
  with gr.Row():
206
  with gr.Column():
207
  input_image = gr.Image(label="Input Image")
208
- prompt = gr.Textbox(label="Prompt", value=DEFAULT_VALUES["prompt"])
209
- negative_prompt = gr.Textbox(label="Negative Prompt", value=DEFAULT_VALUES["negative_prompt"])
210
- guidance_scale = gr.Slider(minimum=1.0, maximum=20.0, value=DEFAULT_VALUES["guidance_scale"], label="Guidance Scale")
211
- conditioning_scale = gr.Slider(minimum=0.1, maximum=2.0, value=DEFAULT_VALUES["conditioning_scale"], label="Conditioning Scale")
212
- num_steps = gr.Slider(minimum=1, maximum=50, value=DEFAULT_VALUES["num_steps"], step=1, label="Number of Steps")
213
- seed = gr.Number(label="Seed", value=DEFAULT_VALUES["seed"])
214
- upscale_factor = gr.Slider(minimum=1, maximum=4, value=DEFAULT_VALUES["upscale_factor"], step=1, label="Upscale Factor")
215
- color_fix_method = gr.Dropdown(
216
- choices=["none", "wavelet", "adain"],
217
- label="Color Fix Method",
218
- value=DEFAULT_VALUES["color_fix_method"]
219
- )
 
 
 
220
 
221
  # Add buttons
222
  with gr.Row():
@@ -263,4 +266,3 @@ with gr.Blocks(title="Controllable Conditional Super-Resolution") as demo:
263
 
264
  if __name__ == "__main__":
265
  demo.launch()
266
-
 
205
  with gr.Row():
206
  with gr.Column():
207
  input_image = gr.Image(label="Input Image")
208
+
209
+ # Put all parameters in an accordion/dropdown
210
+ with gr.Accordion("Advanced Options", open=False):
211
+ prompt = gr.Textbox(label="Prompt", value=DEFAULT_VALUES["prompt"])
212
+ negative_prompt = gr.Textbox(label="Negative Prompt", value=DEFAULT_VALUES["negative_prompt"])
213
+ guidance_scale = gr.Slider(minimum=1.0, maximum=20.0, value=DEFAULT_VALUES["guidance_scale"], label="Guidance Scale")
214
+ conditioning_scale = gr.Slider(minimum=0.1, maximum=2.0, value=DEFAULT_VALUES["conditioning_scale"], label="Conditioning Scale")
215
+ num_steps = gr.Slider(minimum=1, maximum=50, value=DEFAULT_VALUES["num_steps"], step=1, label="Number of Steps")
216
+ seed = gr.Number(label="Seed", value=DEFAULT_VALUES["seed"])
217
+ upscale_factor = gr.Slider(minimum=1, maximum=4, value=DEFAULT_VALUES["upscale_factor"], step=1, label="Upscale Factor")
218
+ color_fix_method = gr.Dropdown(
219
+ choices=["none", "wavelet", "adain"],
220
+ label="Color Fix Method",
221
+ value=DEFAULT_VALUES["color_fix_method"]
222
+ )
223
 
224
  # Add buttons
225
  with gr.Row():
 
266
 
267
  if __name__ == "__main__":
268
  demo.launch()