Fabrice-TIERCELIN commited on
Commit
ef92c97
1 Parent(s): 83a80d8

Move Presetting

Browse files
Files changed (1) hide show
  1. gradio_demo.py +5 -6
gradio_demo.py CHANGED
@@ -355,6 +355,10 @@ with gr.Blocks(title="SUPIR") as interface:
355
  interactive=True)
356
  randomize_seed = gr.Checkbox(label = "\U0001F3B2 Randomize seed", value = True, info = "If checked, result is always different")
357
  seed = gr.Slider(label="Seed", minimum=0, maximum=2147483647, step=1, randomize=True)
 
 
 
 
358
 
359
  with gr.Column():
360
  gr.Markdown("<center>Restoring Output</center>")
@@ -367,11 +371,6 @@ with gr.Blocks(title="SUPIR") as interface:
367
  llave_button = gr.Button(value="Generate description by LlaVa (disabled)")
368
  with gr.Column():
369
  diffusion_button = gr.Button(value="🚀 Upscale/Restore", variant = "primary", elem_id="process_button")
370
- with gr.Row():
371
- with gr.Column():
372
- param_setting = gr.Radio(["Quality", "Fidelity"], interactive=True, label="Presetting", value="Quality")
373
- with gr.Column():
374
- restart_button = gr.Button(value="Apply presetting", scale=2)
375
 
376
  with gr.Accordion("Feedback", open=True, visible=False):
377
  fb_score = gr.Slider(label="Feedback Score", minimum=1, maximum=5, value=3, step=1,
@@ -409,7 +408,7 @@ with gr.Blocks(title="SUPIR") as interface:
409
  seed
410
  ], queue = False, show_progress = False).then(fn = check, inputs = [
411
  input_image
412
- ], outputs = [], queue = False, show_progress = False).then(fn = reset_feedback, inputs = [], outputs = [
413
  fb_score,
414
  fb_text
415
  ], queue = False, show_progress = False).success(fn=stage2_process, inputs = [
 
355
  interactive=True)
356
  randomize_seed = gr.Checkbox(label = "\U0001F3B2 Randomize seed", value = True, info = "If checked, result is always different")
357
  seed = gr.Slider(label="Seed", minimum=0, maximum=2147483647, step=1, randomize=True)
358
+ with gr.Group():
359
+ param_setting = gr.Radio(["Quality", "Fidelity"], interactive=True, label="Presetting", value="Quality")
360
+ restart_button = gr.Button(value="Apply presetting")
361
+
362
 
363
  with gr.Column():
364
  gr.Markdown("<center>Restoring Output</center>")
 
371
  llave_button = gr.Button(value="Generate description by LlaVa (disabled)")
372
  with gr.Column():
373
  diffusion_button = gr.Button(value="🚀 Upscale/Restore", variant = "primary", elem_id="process_button")
 
 
 
 
 
374
 
375
  with gr.Accordion("Feedback", open=True, visible=False):
376
  fb_score = gr.Slider(label="Feedback Score", minimum=1, maximum=5, value=3, step=1,
 
408
  seed
409
  ], queue = False, show_progress = False).then(fn = check, inputs = [
410
  input_image
411
+ ], outputs = [], queue = False, show_progress = False).success(fn = reset_feedback, inputs = [], outputs = [
412
  fb_score,
413
  fb_text
414
  ], queue = False, show_progress = False).success(fn=stage2_process, inputs = [