freealise commited on
Commit
d6f87a7
·
verified ·
1 Parent(s): 95546aa

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -292,11 +292,12 @@ with gr.Blocks() as demo:
292
  with gr.Accordion(label="Upload files here", open=True):
293
  files_input = gr.File(file_count="multiple", file_types=['image', '.mp4'])
294
  gallery_input = gr.Gallery(label="Slideshow", preview=True, columns=8192, interactive=False)
295
- files_input.upload(fn=loadf, inputs=[files_input, max_s, max_l, max_v], outputs=[files_input, gallery_input])
296
  with gr.Accordion(label="Background removal settings", open=False):
297
- max_s = gr.Slider(minimum=0, maximum=255, step=1, value=32, label="Shadow max saturation")
298
- max_l = gr.Slider(minimum=0, maximum=255, step=1, value=64, label="Shadow max lightness")
299
- max_v = gr.Slider(minimum=0, maximum=255, step=1, value=16, label="Shadow max variance")
 
 
300
  with gr.Row():
301
  interpolation_slider = gr.Slider(minimum=1, maximum=5, step=1, value=1, label="Interpolation Steps: ")
302
  interpolation = gr.Number(value=1, show_label=False, interactive=False)
 
292
  with gr.Accordion(label="Upload files here", open=True):
293
  files_input = gr.File(file_count="multiple", file_types=['image', '.mp4'])
294
  gallery_input = gr.Gallery(label="Slideshow", preview=True, columns=8192, interactive=False)
 
295
  with gr.Accordion(label="Background removal settings", open=False):
296
+ max_ = gr.Label(value="Shadow maximums:")
297
+ max_s = gr.Slider(minimum=0, maximum=255, step=1, value=32, label="Saturation")
298
+ max_l = gr.Slider(minimum=0, maximum=255, step=1, value=64, label="Lightness")
299
+ max_v = gr.Slider(minimum=0, maximum=255, step=1, value=16, label="Variance")
300
+ files_input.upload(fn=loadf, inputs=[files_input, max_s, max_l, max_v], outputs=[files_input, gallery_input])
301
  with gr.Row():
302
  interpolation_slider = gr.Slider(minimum=1, maximum=5, step=1, value=1, label="Interpolation Steps: ")
303
  interpolation = gr.Number(value=1, show_label=False, interactive=False)