From 5338dcfd27315d7c75cd0edb80987055e83c0fc5 Mon Sep 17 00:00:00 2001 From: Ligeng Zhu Date: Sat, 10 Aug 2024 14:21:05 +0800 Subject: [PATCH] Use `get_paths_info` for retrieving file metadata (#156) --- upload2hf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/upload2hf.py b/upload2hf.py index 9ac8f087..f4e05483 100644 --- a/upload2hf.py +++ b/upload2hf.py @@ -125,7 +125,7 @@ def compute_lfs_hash(filename): ) continue else: - hf_meta = list(api.list_files_info(repo_id=repo, paths=rpath, repo_type=repo_type))[0] + hf_meta = api.get_paths_info(repo_id=repo, paths=rpath, repo_type=repo_type)[0] if hf_meta.lfs is not None: hash_type = "lfs-sha256"