File size: 349 Bytes
6dadf7f
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
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)