guardiancc
commited on
Commit
•
71e42ea
1
Parent(s):
edd8d5c
Update app.py
Browse files
app.py
CHANGED
@@ -329,6 +329,7 @@ with gr.Blocks() as demo:
|
|
329 |
files_input = gr.File(file_count="multiple", visible=False)
|
330 |
gallery_input = gr.Gallery(label="Slideshow", preview=True, columns=8192, interactive=False)
|
331 |
with gr.Group():
|
|
|
332 |
with gr.Accordion(label="Max differences for background", open=False):
|
333 |
mh = gr.Slider(minimum=0, maximum=180, step=1, value=180, label="Hue")
|
334 |
ms = gr.Slider(minimum=0, maximum=255, step=1, value=255, label="Saturation")
|
@@ -337,7 +338,7 @@ with gr.Blocks() as demo:
|
|
337 |
with gr.Tab("Border"):
|
338 |
b_size = gr.Slider(minimum=1, maximum=255, step=2, value=3, label="Inner")
|
339 |
d_size = gr.Slider(minimum=1, maximum=255, step=2, value=15, label="Outer")
|
340 |
-
files_orig.upload(fn=loadf, inputs=[files_orig,
|
341 |
|
342 |
with gr.Row():
|
343 |
interpolation_slider = gr.Slider(minimum=1, maximum=24, step=1, value=1, label="Interpolation Steps: ")
|
|
|
329 |
files_input = gr.File(file_count="multiple", visible=False)
|
330 |
gallery_input = gr.Gallery(label="Slideshow", preview=True, columns=8192, interactive=False)
|
331 |
with gr.Group():
|
332 |
+
r_bg = gr.Checkbox(label="Remove background", value=False)
|
333 |
with gr.Accordion(label="Max differences for background", open=False):
|
334 |
mh = gr.Slider(minimum=0, maximum=180, step=1, value=180, label="Hue")
|
335 |
ms = gr.Slider(minimum=0, maximum=255, step=1, value=255, label="Saturation")
|
|
|
338 |
with gr.Tab("Border"):
|
339 |
b_size = gr.Slider(minimum=1, maximum=255, step=2, value=3, label="Inner")
|
340 |
d_size = gr.Slider(minimum=1, maximum=255, step=2, value=15, label="Outer")
|
341 |
+
files_orig.upload(fn=loadf, inputs=[files_orig, r_bg, mh, ms, md, lm, b_size, d_size], outputs=[files_input, gallery_input])
|
342 |
|
343 |
with gr.Row():
|
344 |
interpolation_slider = gr.Slider(minimum=1, maximum=24, step=1, value=1, label="Interpolation Steps: ")
|