Skip to content

Commit

Permalink
fix: fix Calibration.from_pretrained support for pathlib.Path
Browse files Browse the repository at this point in the history
  • Loading branch information
hbredin committed Feb 4, 2025
1 parent bb6bc1e commit 27bf53c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyannote/audio/core/calibration.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def from_file(cls, path: str) -> "Calibration":
@classmethod
def from_pretrained(
cls,
checkpoint: str,
checkpoint: Union[Path, str],
subfolder: Optional[str] = None,
token: Optional[Text] = None,
cache_dir: Optional[Union[str, Path]] = None,
Expand All @@ -138,7 +138,7 @@ def from_pretrained(
return cls.from_file(checkpoint)

_, _, path = download_from_hf_hub(
checkpoint,
str(checkpoint),
AssetFileName.Calibration,
subfolder=subfolder,
cache_dir=cache_dir,
Expand Down

0 comments on commit 27bf53c

Please sign in to comment.