nam_nguyenhoai_AI
commited on
Commit
·
2b3efbb
1
Parent(s):
fa3634c
fix bug
Browse files
app.py
CHANGED
@@ -145,17 +145,10 @@ with gr.Blocks(css=css) as demo:
|
|
145 |
def on_submit(uploaded_video,algorithm_type):
|
146 |
|
147 |
# Process the video and get the path of the output video
|
148 |
-
|
149 |
-
|
150 |
-
#return output_video_path
|
151 |
|
152 |
submit.click(on_submit, inputs=[input_video, algorithm_type], outputs=processed_video)
|
153 |
|
154 |
-
#example_files = os.listdir('assets/examples_video')
|
155 |
-
#example_files.sort()
|
156 |
-
#example_files = [os.path.join('assets/examples_video', filename) for filename in example_files]
|
157 |
-
#examples = gr.Examples(examples=example_files, inputs=[input_video], outputs=processed_video, fn=on_submit, cache_examples=True)
|
158 |
-
|
159 |
-
|
160 |
if __name__ == '__main__':
|
161 |
demo.queue().launch()
|
|
|
145 |
def on_submit(uploaded_video,algorithm_type):
|
146 |
|
147 |
# Process the video and get the path of the output video
|
148 |
+
output_video_path = make_video(uploaded_video,encoder=algorithm_type)
|
149 |
+
return output_video_path
|
|
|
150 |
|
151 |
submit.click(on_submit, inputs=[input_video, algorithm_type], outputs=processed_video)
|
152 |
|
|
|
|
|
|
|
|
|
|
|
|
|
153 |
if __name__ == '__main__':
|
154 |
demo.queue().launch()
|