freealise commited on
Commit
2c7c658
1 Parent(s): 3678298

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -1
app.py CHANGED
@@ -513,7 +513,17 @@ with gr.Blocks(css=css) as demo:
513
  return output_video_path
514
 
515
  submit.click(on_submit, inputs=[input_video, model_type], outputs=[processed_video, processed_zip, output_frame, output_depth])
516
- render.click(partial(get_mesh), inputs=[output_frame, output_depth, blur_in], outputs=[result])
 
 
 
 
 
 
 
 
 
 
517
 
518
  example_files = os.listdir('examples')
519
  example_files.sort()
 
513
  return output_video_path
514
 
515
  submit.click(on_submit, inputs=[input_video, model_type], outputs=[processed_video, processed_zip, output_frame, output_depth])
516
+ render.click(partial(get_mesh), inputs=[output_frame, output_depth, blur_in], outputs=[result], js="""
517
+ var iv = setInterval(function() {
518
+ try {
519
+ if (BABYLON && BABYLON.Engine.LastCreatedScene.getNodes()[1].material.pointSize) {
520
+ alert(BABYLON.Engine.LastCreatedScene.getNodes()[1].material.pointSize);
521
+ clearInterval(iv);
522
+ }
523
+ } catch(e) {}
524
+ alert('...');
525
+ }, 1000);
526
+ """)
527
 
528
  example_files = os.listdir('examples')
529
  example_files.sort()