Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -32,12 +32,13 @@ def find_scenes(video_path, threshold=27.0):
|
|
32 |
#shot_out = (scene_list[1][1].get_frames() - 1) / scene_list[1][0].get_framerate()
|
33 |
#print(shot_in, shot_out)
|
34 |
|
35 |
-
print(scene_list, *tuple(shots), sep=', '
|
|
|
36 |
|
37 |
#ffmpeg_extract_subclip(video_path, shot_in, shot_out, targetname="cut.mp4")
|
38 |
|
39 |
-
return scene_list
|
40 |
|
41 |
video_input=gr.Video(source="upload", format="mp4");
|
42 |
|
43 |
-
gr.Interface(fn=find_scenes, inputs=video_input, outputs=
|
|
|
32 |
#shot_out = (scene_list[1][1].get_frames() - 1) / scene_list[1][0].get_framerate()
|
33 |
#print(shot_in, shot_out)
|
34 |
|
35 |
+
print(scene_list, *tuple(shots), sep=', ')
|
36 |
+
print(outputs)
|
37 |
|
38 |
#ffmpeg_extract_subclip(video_path, shot_in, shot_out, targetname="cut.mp4")
|
39 |
|
40 |
+
return scene_list, tuple(shots)
|
41 |
|
42 |
video_input=gr.Video(source="upload", format="mp4");
|
43 |
|
44 |
+
gr.Interface(fn=find_scenes, inputs=video_input, outputs=outputs).launch()
|