Spaces:
Sleeping
Sleeping
Fix
Browse files
app.py
CHANGED
@@ -25,7 +25,8 @@ def fn(video: gr.Video, actions: list[int]):
|
|
25 |
do_detect = 0 in actions
|
26 |
do_classify = 1 in actions
|
27 |
if not do_detect and not do_classify:
|
28 |
-
|
|
|
29 |
with tempfile.NamedTemporaryFile(delete=False, suffix='.mp4') as f:
|
30 |
output = f.name
|
31 |
clip = VideoFileClip(video)
|
@@ -72,7 +73,7 @@ inputs = [
|
|
72 |
type='index')]
|
73 |
outputs = [
|
74 |
gr.Image(interactive=False, label='最新处理的视频帧'),
|
75 |
-
gr.Video(interactive=False, label='
|
76 |
|
77 |
examples = [
|
78 |
['examples/ZFLFDfovqls_001310_001320.mp4'], # cspell: disable-line
|
|
|
25 |
do_detect = 0 in actions
|
26 |
do_classify = 1 in actions
|
27 |
if not do_detect and not do_classify:
|
28 |
+
yield None, video
|
29 |
+
return
|
30 |
with tempfile.NamedTemporaryFile(delete=False, suffix='.mp4') as f:
|
31 |
output = f.name
|
32 |
clip = VideoFileClip(video)
|
|
|
73 |
type='index')]
|
74 |
outputs = [
|
75 |
gr.Image(interactive=False, label='最新处理的视频帧'),
|
76 |
+
gr.Video(interactive=False, label='输出视频片段')]
|
77 |
|
78 |
examples = [
|
79 |
['examples/ZFLFDfovqls_001310_001320.mp4'], # cspell: disable-line
|