Spaces:
Runtime error
Runtime error
Armen Gabrielyan
commited on
Commit
·
b82b5a6
1
Parent(s):
0f78704
improve labels for seconds
Browse files
app.py
CHANGED
@@ -60,12 +60,9 @@ def search_in_video(video, query):
|
|
60 |
ordered_start_ends = []
|
61 |
|
62 |
for [start, end] in video_frame_segs:
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
td = timedelta(seconds=(end / video_fps))
|
67 |
-
e = round(td.total_seconds(), 2)
|
68 |
-
|
69 |
ordered_start_ends.append(f'{s}:{e}')
|
70 |
|
71 |
ordered_start_ends = np.array(ordered_start_ends)[arg_sorted_similarities]
|
|
|
60 |
ordered_start_ends = []
|
61 |
|
62 |
for [start, end] in video_frame_segs:
|
63 |
+
s = timedelta(seconds=(start / video_fps))
|
64 |
+
e = timedelta(seconds=(end / video_fps))
|
65 |
+
|
|
|
|
|
|
|
66 |
ordered_start_ends.append(f'{s}:{e}')
|
67 |
|
68 |
ordered_start_ends = np.array(ordered_start_ends)[arg_sorted_similarities]
|