freealise commited on
Commit
59f0d02
1 Parent(s): 71235e3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -3
app.py CHANGED
@@ -533,7 +533,11 @@ with gr.Blocks(css=css) as demo:
533
 
534
  def on_submit(uploaded_video,model_type,coordinates):
535
 
536
- print(coordinates)
 
 
 
 
537
  # Process the video and get the path of the output video
538
  output_video_path = make_video(uploaded_video,encoder=model_type)
539
 
@@ -545,9 +549,8 @@ with gr.Blocks(css=css) as demo:
545
  example_files = os.listdir('examples')
546
  example_files.sort()
547
  example_files = [os.path.join('examples', filename) for filename in example_files]
548
- example_model = ['vits']
549
 
550
- examples = gr.Examples(examples=[example_files, example_model, example_coords], inputs=[input_video, model_type, coords], outputs=[processed_video, processed_zip, output_frame, output_depth], fn=on_submit, cache_examples=True)
551
 
552
 
553
  if __name__ == '__main__':
 
533
 
534
  def on_submit(uploaded_video,model_type,coordinates):
535
 
536
+ if not coordinates:
537
+ print(example_coords[0])
538
+ else:
539
+ print(coordinates)
540
+
541
  # Process the video and get the path of the output video
542
  output_video_path = make_video(uploaded_video,encoder=model_type)
543
 
 
549
  example_files = os.listdir('examples')
550
  example_files.sort()
551
  example_files = [os.path.join('examples', filename) for filename in example_files]
 
552
 
553
+ examples = gr.Examples(examples=example_files, inputs=[input_video], outputs=[processed_video, processed_zip, output_frame, output_depth], fn=on_submit, cache_examples=True)
554
 
555
 
556
  if __name__ == '__main__':