Chao Xu commited on
Commit
47c5597
โ€ข
1 Parent(s): 03177fd

remove some queues

Browse files
Files changed (1) hide show
  1. app.py +7 -6
app.py CHANGED
@@ -595,16 +595,17 @@ def run_demo(
595
  ).success(fn=partial(update_guide, _BBOX_1), outputs=[guide_text], queue=False
596
  ).success(fn=init_bbox,
597
  inputs=[image_block],
598
- outputs=[bbox_block, *bbox_sliders]
599
- ).success(fn=partial(update_guide, _BBOX_3), outputs=[guide_text]
600
- ).success(enable_func, inputs=run_btn, outputs=run_btn)
601
 
602
 
603
  for bbox_slider in bbox_sliders:
604
  bbox_slider.release(fn=on_coords_slider,
605
  inputs=[image_block, *bbox_sliders],
606
- outputs=[bbox_block]
607
- ).success(fn=partial(update_guide, _BBOX_2), outputs=[guide_text])
 
608
 
609
  cam_vis = CameraVisualizer(vis_output)
610
 
@@ -624,7 +625,7 @@ def run_demo(
624
  btn_retry.change(fn=on_retry_button_click, inputs=[*btn_retrys], outputs=[regen_view_btn, regen_mesh_btn])
625
 
626
 
627
- run_btn.click(fn=partial(update_guide, _SAM), outputs=[guide_text]
628
  ).success(fn=partial(preprocess_run, predictor, models),
629
  inputs=[image_block, preprocess_chk, *bbox_sliders],
630
  outputs=[sam_block]
 
595
  ).success(fn=partial(update_guide, _BBOX_1), outputs=[guide_text], queue=False
596
  ).success(fn=init_bbox,
597
  inputs=[image_block],
598
+ outputs=[bbox_block, *bbox_sliders], queue=False
599
+ ).success(fn=partial(update_guide, _BBOX_3), outputs=[guide_text], queue=False
600
+ ).success(enable_func, inputs=run_btn, outputs=run_btn, queue=False)
601
 
602
 
603
  for bbox_slider in bbox_sliders:
604
  bbox_slider.release(fn=on_coords_slider,
605
  inputs=[image_block, *bbox_sliders],
606
+ outputs=[bbox_block],
607
+ queue=False
608
+ ).success(fn=partial(update_guide, _BBOX_2), outputs=[guide_text], queue=False)
609
 
610
  cam_vis = CameraVisualizer(vis_output)
611
 
 
625
  btn_retry.change(fn=on_retry_button_click, inputs=[*btn_retrys], outputs=[regen_view_btn, regen_mesh_btn])
626
 
627
 
628
+ run_btn.click(fn=partial(update_guide, _SAM), outputs=[guide_text], queue=False
629
  ).success(fn=partial(preprocess_run, predictor, models),
630
  inputs=[image_block, preprocess_chk, *bbox_sliders],
631
  outputs=[sam_block]