freealise commited on
Commit
ecd01f4
1 Parent(s): f233963

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -468,14 +468,14 @@ with gr.Blocks(css=css) as demo:
468
  output_frame = gr.Gallery(label="Frames", preview=True, columns=8192, type="numpy")
469
  output_switch = gr.Checkbox(label="Show depths")
470
  output_switch.input(fn=switch_rows, inputs=[output_switch], outputs=[output_frame])
471
- output_mask = gr.ImageEditor(layers=True, sources=None, type="numpy", interactive=True, show_progress='hidden', transforms=(None,), eraser=gr.Eraser(), brush=gr.Brush(default_size=0, colors=['black', '#505050', '#a0a0a0', 'white']), elem_id="image_edit")
472
  with gr.Accordion(label="Edge", open=False):
473
  gradients = gr.Files(visible=False, value=['./gradient_large.png', './gradient.png', './gradient_small.png'])
474
  levels = gr.Number(label="Color levels", value=16, maximum=32, minimum=2, step=1)
475
  contour = gr.Number(label="Contour width", value=3, maximum=15, minimum=1, step=2)
476
  kernel = gr.Number(label="Average", value=7, maximum=16, minimum=0, step=1)
477
  mouse = gr.Textbox(elem_id="mouse", value="""[]""", interactive=False)
478
- mouse.input(fn=draw_mask, inputs=[gradients, levels, contour, kernel, mouse, output_mask], outputs=[output_mask])
479
  selector = gr.HTML(value="""
480
  <a href='#' id='selector' onclick='this.style.fontWeight=\"bold\";
481
  document.body.appendChild(document.getElementById(\"select_cursor\"));
 
468
  output_frame = gr.Gallery(label="Frames", preview=True, columns=8192, type="numpy")
469
  output_switch = gr.Checkbox(label="Show depths")
470
  output_switch.input(fn=switch_rows, inputs=[output_switch], outputs=[output_frame])
471
+ output_mask = gr.ImageEditor(layers=True, sources=None, type="numpy", interactive=True, transforms=(None,), eraser=gr.Eraser(), brush=gr.Brush(default_size=0, colors=['black', '#505050', '#a0a0a0', 'white']), elem_id="image_edit")
472
  with gr.Accordion(label="Edge", open=False):
473
  gradients = gr.Files(visible=False, value=['./gradient_large.png', './gradient.png', './gradient_small.png'])
474
  levels = gr.Number(label="Color levels", value=16, maximum=32, minimum=2, step=1)
475
  contour = gr.Number(label="Contour width", value=3, maximum=15, minimum=1, step=2)
476
  kernel = gr.Number(label="Average", value=7, maximum=16, minimum=0, step=1)
477
  mouse = gr.Textbox(elem_id="mouse", value="""[]""", interactive=False)
478
+ mouse.input(fn=draw_mask, show_progress="hidden", inputs=[gradients, levels, contour, kernel, mouse, output_mask], outputs=[output_mask])
479
  selector = gr.HTML(value="""
480
  <a href='#' id='selector' onclick='this.style.fontWeight=\"bold\";
481
  document.body.appendChild(document.getElementById(\"select_cursor\"));