File size: 775 Bytes
a809e1c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import sys
import os

# Add the parent directory to sys.path to allow imports from 'src'
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))

from src.model_downloader import ModelDownloader

def download_all():
    print("Starting download of all models...")
    downloader = ModelDownloader()
    models = downloader.list_available_models()
    
    for model_name in models:
        try:
            print(f"Checking/Downloading {model_name}...")
            path = downloader.download_model(model_name)
            print(f"βœ“ {model_name} is ready at {path}")
        except Exception as e:
            print(f"βœ— Failed to download {model_name}: {e}")

    print("\nAll downloads completed.")

if __name__ == "__main__":
    download_all()