Spaces:
Build error
Build error
make camera params interactive (#3)
Browse files- make camera params interactive (93d7881ff19f3e1f60c6e02843edbd223b3463d4)
Co-authored-by: Radamés Ajna <radames@users.noreply.huggingface.co>
app.py
CHANGED
@@ -605,10 +605,28 @@ def run_demo(
|
|
605 |
# because otherwise the gradio plot always resets the plotly 3D viewpoint for some reason,
|
606 |
# which might confuse the user into thinking that the plot has been updated too.
|
607 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
608 |
vis_btn.click(fn=partial(main_run, models, device, cam_vis, 'vis'),
|
609 |
inputs=[polar_slider, azimuth_slider, radius_slider,
|
610 |
image_block, preprocess_chk],
|
611 |
-
outputs=[desc_output, vis_output, preproc_output]
|
|
|
612 |
|
613 |
run_btn.click(fn=partial(main_run, models, device, cam_vis, 'gen'),
|
614 |
inputs=[polar_slider, azimuth_slider, radius_slider,
|
|
|
605 |
# because otherwise the gradio plot always resets the plotly 3D viewpoint for some reason,
|
606 |
# which might confuse the user into thinking that the plot has been updated too.
|
607 |
|
608 |
+
polar_slider.change(fn=partial(main_run, models, device, cam_vis, 'vis'),
|
609 |
+
inputs=[polar_slider, azimuth_slider, radius_slider,
|
610 |
+
image_block, preprocess_chk],
|
611 |
+
outputs=[desc_output, vis_output, preproc_output],
|
612 |
+
queue=False)
|
613 |
+
azimuth_slider.change(fn=partial(main_run, models, device, cam_vis, 'vis'),
|
614 |
+
inputs=[polar_slider, azimuth_slider, radius_slider,
|
615 |
+
image_block, preprocess_chk],
|
616 |
+
outputs=[desc_output, vis_output, preproc_output],
|
617 |
+
queue=False)
|
618 |
+
|
619 |
+
radius_slider.change(fn=partial(main_run, models, device, cam_vis, 'vis'),
|
620 |
+
inputs=[polar_slider, azimuth_slider, radius_slider,
|
621 |
+
image_block, preprocess_chk],
|
622 |
+
outputs=[desc_output, vis_output, preproc_output],
|
623 |
+
queue=False)
|
624 |
+
|
625 |
vis_btn.click(fn=partial(main_run, models, device, cam_vis, 'vis'),
|
626 |
inputs=[polar_slider, azimuth_slider, radius_slider,
|
627 |
image_block, preprocess_chk],
|
628 |
+
outputs=[desc_output, vis_output, preproc_output],
|
629 |
+
queue=False)
|
630 |
|
631 |
run_btn.click(fn=partial(main_run, models, device, cam_vis, 'gen'),
|
632 |
inputs=[polar_slider, azimuth_slider, radius_slider,
|