Dekonstruktio commited on
Commit
fbbc392
·
verified ·
1 Parent(s): d70eba1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -16
app.py CHANGED
@@ -282,24 +282,20 @@ class UpscalerApp:
282
  with gr.Blocks(theme=gr.themes.Soft()) as demo:
283
  gr.Markdown("# Image Upscaler GUI with A/B Testing")
284
 
285
- with gr.Accordion("Advanced Settings", open=False):
286
  with gr.Row():
287
- upscaler_size_slider = gr.Slider(minimum=1.1, maximum=4.0, value=2.0, step=0.1, label="Upscale Factor")
288
  with gr.Row():
289
- tile_slider = gr.Slider(minimum=0, maximum=1024, value=192, step=16, label="Tile Size (0 is not tile)")
290
  with gr.Row():
291
- tile_overlap_slider = gr.Slider(minimum=0, maximum=128, value=8, step=1, label="Tile Overlap")
292
  with gr.Row():
293
- half_checkbox = gr.Checkbox(label="Use Half Precision (FP16)", value=True)
294
 
295
 
296
- with gr.Tab("Blind Test Comparison"):
297
- gr.Markdown("Upload an image, compare the results, and select your favorite. Your vote is recorded to rank the models.")
298
- gr.Markdown(
299
- "> **Disclaimer:** This application **does not store your uploaded images**. "
300
- "It only anonymously records which upscaler you prefer to rank them. "
301
- "The collected statistics are publicly available at "
302
- "[upscaler_preferences.csv](https://huggingface.co/datasets/TestOrganizationPleaseIgnore/upscale_board_data/blob/main/upscaler_preferences.csv)."
303
  )
304
  model_a_state = gr.State("")
305
  model_b_state = gr.State("")
@@ -332,14 +328,14 @@ class UpscalerApp:
332
  )
333
 
334
  with gr.Tab("Upscaler Playground"):
335
- gr.Markdown("Select an upscaler model, choose a scaling factor, and process your image.")
336
  with gr.Row():
337
  with gr.Column(scale=1):
338
- input_image_playground = gr.Image(type="pil", label="Source Image", format="png")
339
  upscaler_model_dropdown = gr.Dropdown(value="R-ESRGAN_4x+", choices=list(UPSCALER_DICT_GUI.keys()), label="Upscaler Model")
340
- run_button_playground = gr.Button("Run Upscale")
341
  with gr.Column(scale=2):
342
- output_image_playground = gr.Image(label="Upscaled Result", interactive=False, format="png")
343
 
344
  run_button_playground.click(
345
  fn=gpu_tab2,
 
282
  with gr.Blocks(theme=gr.themes.Soft()) as demo:
283
  gr.Markdown("# Image Upscaler GUI with A/B Testing")
284
 
285
+ with gr.Accordion("Advanced Settings", open=True):
286
  with gr.Row():
287
+ upscaler_size_slider = gr.Slider(minimum=2, maximum=4, value=4, step=1, label="Upscale")
288
  with gr.Row():
289
+ tile_slider = gr.Slider(minimum=0, maximum=1024, value=1024, step=16, label="Tile Size")
290
  with gr.Row():
291
+ tile_overlap_slider = gr.Slider(minimum=0, maximum=128, value=0, step=1, label="Tile Overlap")
292
  with gr.Row():
293
+ half_checkbox = gr.Checkbox(label="Use Half Precision (FP16)", value=False)
294
 
295
 
296
+ with gr.Tab("Comparison"):
297
+ gr.Markdown(" ")
298
+ gr.Markdown(" "
 
 
 
 
299
  )
300
  model_a_state = gr.State("")
301
  model_b_state = gr.State("")
 
328
  )
329
 
330
  with gr.Tab("Upscaler Playground"):
331
+ gr.Markdown(" ")
332
  with gr.Row():
333
  with gr.Column(scale=1):
334
+ input_image_playground = gr.Image(type="pil", label="Source Image", format="jpg")
335
  upscaler_model_dropdown = gr.Dropdown(value="R-ESRGAN_4x+", choices=list(UPSCALER_DICT_GUI.keys()), label="Upscaler Model")
336
+ run_button_playground = gr.Button("Upscale")
337
  with gr.Column(scale=2):
338
+ output_image_playground = gr.Image(label="Upscaled Result", interactive=False, format="jpg")
339
 
340
  run_button_playground.click(
341
  fn=gpu_tab2,