Spaces:
Runtime error
Runtime error
Update huggingface/user.py
Browse files- huggingface/user.py +2 -1
huggingface/user.py
CHANGED
@@ -59,7 +59,8 @@ class HFUser:
|
|
59 |
_raw = self.hf_api.list_repo_files(repo, repo_type="dataset")
|
60 |
if repo == "OpenVideo/Sample-2k":
|
61 |
files = filter(lambda f: f.endswith(".mp4"), _raw)
|
62 |
-
|
|
|
63 |
return list(files)
|
64 |
|
65 |
def fetch_file(self, fname, local_dir="/dev/shm"):
|
|
|
59 |
_raw = self.hf_api.list_repo_files(repo, repo_type="dataset")
|
60 |
if repo == "OpenVideo/Sample-2k":
|
61 |
files = filter(lambda f: f.endswith(".mp4"), _raw)
|
62 |
+
else:
|
63 |
+
files = filter(lambda f: f.startswith(path + os.sep), _raw)
|
64 |
return list(files)
|
65 |
|
66 |
def fetch_file(self, fname, local_dir="/dev/shm"):
|