freealise commited on
Commit
87b9836
1 Parent(s): 66fd680

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -475,7 +475,7 @@ with gr.Blocks(css=css) as demo:
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.getElementById(\"image_edit\").getElementsByTagName(\"canvas\")[0].oncontextmenu = function(e){e.preventDefault();}
@@ -522,11 +522,11 @@ with gr.Blocks(css=css) as demo:
522
 
523
  document.getElementById(\"mouse\").getElementsByTagName(\"textarea\")[0].style.borderColor = \"#ffffff\";
524
 
525
- }' title='Select point' style='text-decoration:none;color:white;'>⬚ Select point</a> <a href='#' id='clear_select' onclick='
526
 
527
  document.getElementById(\"mouse\").getElementsByTagName(\"textarea\")[0].value = \"[]\";
528
 
529
- ' title='Clear selection' style='text-decoration:none;color:white;'>[x] Clear selection</a>""")
530
  submit = gr.Button("Submit")
531
  with gr.Column():
532
  model_type = gr.Dropdown([("small", "vits"), ("base", "vitb"), ("large", "vitl")], type="value", value="vits", label='Model Type')
 
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="minimal", 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.getElementById(\"image_edit\").getElementsByTagName(\"canvas\")[0].oncontextmenu = function(e){e.preventDefault();}
 
522
 
523
  document.getElementById(\"mouse\").getElementsByTagName(\"textarea\")[0].style.borderColor = \"#ffffff\";
524
 
525
+ }' title='Select point' style='text-decoration:none;color:white;'>⊹ Select point</a> <a href='#' id='clear_select' onclick='
526
 
527
  document.getElementById(\"mouse\").getElementsByTagName(\"textarea\")[0].value = \"[]\";
528
 
529
+ ' title='Clear selection' style='text-decoration:none;color:white;'>✕ Clear selection</a>""")
530
  submit = gr.Button("Submit")
531
  with gr.Column():
532
  model_type = gr.Dropdown([("small", "vits"), ("base", "vitb"), ("large", "vitl")], type="value", value="vits", label='Model Type')