File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 1
- import io
2
- from typing import Any
1
+ import os
3
2
import shutil
4
- from videohash import VideoHash # type: ignore
3
+ from typing import Any
5
4
from uuid import uuid4
6
- import os
5
+
6
+ from videohash import VideoHash # type: ignore
7
7
8
8
from DPF .types import ModalityToDataMapping
9
9
@@ -23,7 +23,7 @@ def __init__(
23
23
24
24
@property
25
25
def result_columns (self ) -> list [str ]:
26
- return [f "video_hash" ]
26
+ return ["video_hash" ]
27
27
28
28
@property
29
29
def dataloader_kwargs (self ) -> dict [str , Any ]:
@@ -48,7 +48,7 @@ def preprocess_data(
48
48
video_path = os .path .join (tmp_dir , 'video.mp4' )
49
49
with open (video_path , 'wb' ) as f :
50
50
f .write (video_file )
51
-
51
+
52
52
hash_obj = VideoHash (path = video_path , storage_path = tmp_dir )
53
53
shutil .rmtree (hash_obj .storage_path )
54
54
os .remove (video_path )
You can’t perform that action at this time.
0 commit comments