HE-to-IHC / asp /util /io_utils.py
antoinedelplace
Automatic weight download
6dadf7f
raw
history blame contribute delete
349 Bytes
import os
import gdown
def download_weights(file_id, weights_path):
if os.path.exists(weights_path):
print(f"Weights already exist at {weights_path}.")
return
os.makedirs(os.path.dirname(weights_path), exist_ok=True)
url = f"https://drive.google.com/uc?id={file_id}"
gdown.download(url, weights_path, quiet=False)