Spaces:
Running
on
A100
Running
on
A100
app.py
CHANGED
@@ -38,9 +38,9 @@ def process_video(
|
|
38 |
progress = gr.Progress()
|
39 |
) -> Tuple[str, str, str, str]:
|
40 |
try:
|
41 |
-
duration = get_video_duration_seconds(video_path)
|
42 |
-
if duration > 1200: # 20 minutes
|
43 |
-
|
44 |
|
45 |
progress(0.1, desc="Loading model...")
|
46 |
model, processor = load_model()
|
@@ -111,7 +111,8 @@ def create_ui(examples_path: str):
|
|
111 |
with gr.Column(scale=1):
|
112 |
input_video = gr.Video(
|
113 |
label="Upload your video (max 20 minutes)",
|
114 |
-
interactive=True
|
|
|
115 |
)
|
116 |
process_btn = gr.Button("Process Video", variant="primary")
|
117 |
status = gr.Markdown(visible=True)
|
@@ -125,7 +126,6 @@ def create_ui(examples_path: str):
|
|
125 |
label="Highlight Video",
|
126 |
visible=False,
|
127 |
interactive=False,
|
128 |
-
downloadable=True # Enable download button
|
129 |
)
|
130 |
|
131 |
# Analysis accordion
|
|
|
38 |
progress = gr.Progress()
|
39 |
) -> Tuple[str, str, str, str]:
|
40 |
try:
|
41 |
+
# duration = get_video_duration_seconds(video_path)
|
42 |
+
# if duration > 1200: # 20 minutes
|
43 |
+
# return None, None, None, "Video must be shorter than 20 minutes"
|
44 |
|
45 |
progress(0.1, desc="Loading model...")
|
46 |
model, processor = load_model()
|
|
|
111 |
with gr.Column(scale=1):
|
112 |
input_video = gr.Video(
|
113 |
label="Upload your video (max 20 minutes)",
|
114 |
+
interactive=True,
|
115 |
+
max_length = 1200
|
116 |
)
|
117 |
process_btn = gr.Button("Process Video", variant="primary")
|
118 |
status = gr.Markdown(visible=True)
|
|
|
126 |
label="Highlight Video",
|
127 |
visible=False,
|
128 |
interactive=False,
|
|
|
129 |
)
|
130 |
|
131 |
# Analysis accordion
|