Spaces:
Running
Running
Update app.py
Browse files
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 |
-
|
|
|
|
|
|
|
|
|
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=
|
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__':
|