We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a702d58 commit 5b9b696Copy full SHA for 5b9b696
pickle_scanning_benchmark/download.py
@@ -97,8 +97,12 @@ def hf_download_pickle_files(
97
98
def _check_content(content):
99
# Typical access error from HF API
100
- if content.startswith("Access to model"):
101
- raise Exception("Can not access model file")
+ if isinstance(content, bytes):
+ if content.startswith(b"Access to model"):
102
+ raise Exception("Can not access model file")
103
+ else:
104
+ if content.startswith("Access to model"):
105
106
107
108
def _download_pickle_file(url, file, outdir):
0 commit comments