Skip to content

Commit

Permalink
fix code style
Browse files Browse the repository at this point in the history
  • Loading branch information
boomb0om committed Jul 23, 2024
1 parent b3c393d commit 8ea9ff0
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions DPF/filters/videos/videohash_filter.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import io
from typing import Any
import os
import shutil
from videohash import VideoHash # type: ignore
from typing import Any
from uuid import uuid4
import os

from videohash import VideoHash # type: ignore

from DPF.types import ModalityToDataMapping

Expand All @@ -23,7 +23,7 @@ def __init__(

@property
def result_columns(self) -> list[str]:
return [f"video_hash"]
return ["video_hash"]

@property
def dataloader_kwargs(self) -> dict[str, Any]:
Expand All @@ -48,7 +48,7 @@ def preprocess_data(
video_path = os.path.join(tmp_dir, 'video.mp4')
with open(video_path, 'wb') as f:
f.write(video_file)

hash_obj = VideoHash(path=video_path, storage_path=tmp_dir)
shutil.rmtree(hash_obj.storage_path)
os.remove(video_path)
Expand Down

0 comments on commit 8ea9ff0

Please sign in to comment.