Skip to content

Commit

Permalink
typos
Browse files Browse the repository at this point in the history
  • Loading branch information
lhoestq committed Oct 16, 2024
1 parent a57f51b commit 18eda0d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/datasets/features/video.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

@dataclass
class Video:
"""Video [`Feature`] to read video data from an video file.
"""Video [`Feature`] to read video data from a video file.
Input: The Video feature accepts as input:
- A `str`: Absolute path to the video file (i.e. random access is allowed).
Expand Down Expand Up @@ -104,7 +104,7 @@ def encode_example(self, value: Union[str, bytes, dict, np.ndarray, "VideoReader
return {"bytes": value.get("bytes"), "path": value.get("path")}
else:
raise ValueError(
f"An video sample should have one of 'path' or 'bytes' but they are missing or None in {value}."
f"A video sample should have one of 'path' or 'bytes' but they are missing or None in {value}."
)

def decode_example(self, value: dict, token_per_repo_id=None) -> "VideoReader":
Expand Down Expand Up @@ -139,7 +139,7 @@ def decode_example(self, value: dict, token_per_repo_id=None) -> "VideoReader":
path, bytes_ = value["path"], value["bytes"]
if bytes_ is None:
if path is None:
raise ValueError(f"An video should have one of 'path' or 'bytes' but both are None in {value}.")
raise ValueError(f"A video should have one of 'path' or 'bytes' but both are None in {value}.")
else:
if is_local_path(path):
video = VideoReader(path)
Expand Down

0 comments on commit 18eda0d

Please sign in to comment.