Skip to content

Commit

Permalink
fix missing slash (#3096)
Browse files Browse the repository at this point in the history
  • Loading branch information
lhoestq authored Oct 29, 2024
1 parent 1262fdf commit 9569e2a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libs/libcommon/src/libcommon/url_preparator.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def prepare_url(self, url: str, revision: str) -> str:
# Before: hf://datasets/username/dataset_name@5fe59d7e52732b86d11ee0e9c4a8cdb0e8ba7a6e/video.mp4
# After: https://huggingface.co/datasets/username/dataset_name/resolve/5fe59d7e52732b86d11ee0e9c4a8cdb0e8ba7a6e/video.mp4
if url.startswith("hf://"):
url = url.replace("hf://", self.hf_endpoint).replace("@", "/resolve/")
url = url.replace("hf://", self.hf_endpoint + "/").replace("@", "/resolve/")
return url

def __str__(self) -> str:
Expand Down

0 comments on commit 9569e2a

Please sign in to comment.