Spaces:
Running on Zero
Running on Zero
Update app.py
Browse files
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=
|
| 286 |
with gr.Row():
|
| 287 |
-
upscaler_size_slider = gr.Slider(minimum=
|
| 288 |
with gr.Row():
|
| 289 |
-
tile_slider = gr.Slider(minimum=0, maximum=1024, value=
|
| 290 |
with gr.Row():
|
| 291 |
-
tile_overlap_slider = gr.Slider(minimum=0, maximum=128, value=
|
| 292 |
with gr.Row():
|
| 293 |
-
half_checkbox = gr.Checkbox(label="Use Half Precision (FP16)", value=
|
| 294 |
|
| 295 |
|
| 296 |
-
with gr.Tab("
|
| 297 |
-
gr.Markdown("
|
| 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("
|
| 336 |
with gr.Row():
|
| 337 |
with gr.Column(scale=1):
|
| 338 |
-
input_image_playground = gr.Image(type="pil", label="Source Image", format="
|
| 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("
|
| 341 |
with gr.Column(scale=2):
|
| 342 |
-
output_image_playground = gr.Image(label="Upscaled Result", interactive=False, format="
|
| 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,
|