Update app.py
Browse files
app.py
CHANGED
@@ -327,7 +327,8 @@ with gr.Blocks() as demo:
|
|
327 |
with gr.Row():
|
328 |
with gr.Column():
|
329 |
with gr.Accordion(label="Upload files here", open=True):
|
330 |
-
|
|
|
331 |
gallery_input = gr.Gallery(label="Slideshow", preview=True, columns=8192, interactive=False)
|
332 |
with gr.Accordion(label="Background removal settings", open=False):
|
333 |
with gr.Tab(label="Shadow maximums"):
|
@@ -336,7 +337,11 @@ with gr.Blocks() as demo:
|
|
336 |
max_v = gr.Slider(minimum=0, maximum=255, step=1, value=16, label="Detail")
|
337 |
lt = gr.Radio(label="Maximum is", choices=["average", "median", "slider"], value="slider")
|
338 |
rbg = gr.Checkbox(label="Remove background", value=True)
|
339 |
-
|
|
|
|
|
|
|
|
|
340 |
with gr.Row():
|
341 |
interpolation_slider = gr.Slider(minimum=1, maximum=5, step=1, value=1, label="Interpolation Steps: ")
|
342 |
interpolation = gr.Number(value=1, show_label=False, interactive=False)
|
@@ -357,7 +362,7 @@ with gr.Blocks() as demo:
|
|
357 |
32, 64, 16, "slider", True
|
358 |
]],
|
359 |
fn=loadf,
|
360 |
-
inputs=[
|
361 |
outputs=[files_input, gallery_input],
|
362 |
cache_examples=True
|
363 |
)
|
|
|
327 |
with gr.Row():
|
328 |
with gr.Column():
|
329 |
with gr.Accordion(label="Upload files here", open=True):
|
330 |
+
files_orig = gr.File(file_count="multiple", file_types=['image', '.mp4'])
|
331 |
+
files_input = gr.File(file_count="multiple", visible=False)
|
332 |
gallery_input = gr.Gallery(label="Slideshow", preview=True, columns=8192, interactive=False)
|
333 |
with gr.Accordion(label="Background removal settings", open=False):
|
334 |
with gr.Tab(label="Shadow maximums"):
|
|
|
337 |
max_v = gr.Slider(minimum=0, maximum=255, step=1, value=16, label="Detail")
|
338 |
lt = gr.Radio(label="Maximum is", choices=["average", "median", "slider"], value="slider")
|
339 |
rbg = gr.Checkbox(label="Remove background", value=True)
|
340 |
+
files_orig.upload(fn=loadf, inputs=[files_orig, max_s, max_l, max_v, lt, rbg], outputs=[files_input, gallery_input])
|
341 |
+
max_s.input(fn=loadf, inputs=[files_orig, max_s, max_l, max_v, lt, rbg], outputs=[files_input, gallery_input])
|
342 |
+
max_l.input(fn=loadf, inputs=[files_orig, max_s, max_l, max_v, lt, rbg], outputs=[files_input, gallery_input])
|
343 |
+
max_v.input(fn=loadf, inputs=[files_orig, max_s, max_l, max_v, lt, rbg], outputs=[files_input, gallery_input])
|
344 |
+
|
345 |
with gr.Row():
|
346 |
interpolation_slider = gr.Slider(minimum=1, maximum=5, step=1, value=1, label="Interpolation Steps: ")
|
347 |
interpolation = gr.Number(value=1, show_label=False, interactive=False)
|
|
|
362 |
32, 64, 16, "slider", True
|
363 |
]],
|
364 |
fn=loadf,
|
365 |
+
inputs=[files_orig, max_s, max_l, max_v, lt, rbg],
|
366 |
outputs=[files_input, gallery_input],
|
367 |
cache_examples=True
|
368 |
)
|