Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -3,9 +3,10 @@ from video_processing import process_video
|
|
3 |
|
4 |
def display_results(video_url, description):
|
5 |
final_clip_path = process_video(video_url, description)
|
6 |
-
|
|
|
|
|
7 |
|
8 |
-
# Define the Gradio interface
|
9 |
with gr.Blocks() as demo:
|
10 |
gr.Markdown("# My AI Video Processing App")
|
11 |
video_url = gr.Textbox(label="Video URL or Filepath")
|
@@ -15,6 +16,5 @@ with gr.Blocks() as demo:
|
|
15 |
submit_button = gr.Button("Process Video")
|
16 |
submit_button.click(fn=display_results, inputs=[video_url, description], outputs=[video_output, download_output])
|
17 |
|
18 |
-
# Launch the app
|
19 |
demo.launch()
|
20 |
|
|
|
3 |
|
4 |
def display_results(video_url, description):
|
5 |
final_clip_path = process_video(video_url, description)
|
6 |
+
if final_clip_path:
|
7 |
+
return final_clip_path, final_clip_path
|
8 |
+
return "No matching scene found", None
|
9 |
|
|
|
10 |
with gr.Blocks() as demo:
|
11 |
gr.Markdown("# My AI Video Processing App")
|
12 |
video_url = gr.Textbox(label="Video URL or Filepath")
|
|
|
16 |
submit_button = gr.Button("Process Video")
|
17 |
submit_button.click(fn=display_results, inputs=[video_url, description], outputs=[video_output, download_output])
|
18 |
|
|
|
19 |
demo.launch()
|
20 |
|