freealise commited on
Commit
f290ef8
·
verified ·
1 Parent(s): 70acaa3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -0
app.py CHANGED
@@ -305,6 +305,11 @@ def blur_image(image, depth, blur_data):
305
 
306
  return blur_frame
307
 
 
 
 
 
 
308
  def loadfile(f):
309
  return f
310
 
@@ -718,6 +723,7 @@ with gr.Blocks(css=css, js=js, head=head) as demo:
718
  ' onchange='this.click();'/><span>1</span>""")
719
  with gr.Accordion(label="Levels", open=False):
720
  blur_in = gr.Textbox(elem_id="blur_in", label="Kernel size", show_label=False, interactive=False, value=blurin)
 
721
  with gr.Group():
722
  with gr.Accordion(label="Locations", open=False):
723
  output_frame.select(fn=select_frame, inputs=[output_mask], outputs=[output_mask, selected])
 
305
 
306
  return blur_frame
307
 
308
+ def update_blur(blur):
309
+ global blurin
310
+ blurin = blur
311
+ return None
312
+
313
  def loadfile(f):
314
  return f
315
 
 
723
  ' onchange='this.click();'/><span>1</span>""")
724
  with gr.Accordion(label="Levels", open=False):
725
  blur_in = gr.Textbox(elem_id="blur_in", label="Kernel size", show_label=False, interactive=False, value=blurin)
726
+ blur_in.input(fn=update_blur, inputs=[blur_in], outputs=None)
727
  with gr.Group():
728
  with gr.Accordion(label="Locations", open=False):
729
  output_frame.select(fn=select_frame, inputs=[output_mask], outputs=[output_mask, selected])