Spaces:
Runtime error
Runtime error
a small bug fix
Browse files
app.py
CHANGED
|
@@ -43,11 +43,11 @@ def apply_mask(image, mask, color, transparency=0.7):
|
|
| 43 |
return out_image
|
| 44 |
|
| 45 |
def process(text_query, full_video_path):
|
| 46 |
-
start_pt,
|
| 47 |
input_clip_path = '/tmp/input.mp4'
|
| 48 |
# extract the relevant subclip:
|
| 49 |
with VideoFileClip(full_video_path) as video:
|
| 50 |
-
subclip = video.subclip(start_pt,
|
| 51 |
subclip.write_videofile(input_clip_path)
|
| 52 |
|
| 53 |
checkpoint_path ='./refer-youtube-vos_window-12.pth.tar'
|
|
|
|
| 43 |
return out_image
|
| 44 |
|
| 45 |
def process(text_query, full_video_path):
|
| 46 |
+
start_pt, max_end_pt = 0, 10
|
| 47 |
input_clip_path = '/tmp/input.mp4'
|
| 48 |
# extract the relevant subclip:
|
| 49 |
with VideoFileClip(full_video_path) as video:
|
| 50 |
+
subclip = video.subclip(start_pt, min(video.duration, max_end_pt))
|
| 51 |
subclip.write_videofile(input_clip_path)
|
| 52 |
|
| 53 |
checkpoint_path ='./refer-youtube-vos_window-12.pth.tar'
|