Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

torch_multimodal_clip model get failed due to network issue #2289

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion torchbenchmark/models/torch_multimodal_clip/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@

def download(output_filename, uri):
# Download the file with streaming to handle large files
response = requests.get(uri, stream=True)
headers = {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3'
}
response = requests.get(uri, headers=headers, stream=True)
if response.status_code == 200:
with open(output_filename, 'wb') as f:
for chunk in response.iter_content(chunk_size=8192): # Define the chunk size to be used
Expand Down
Loading