File size: 661 Bytes
d896bd4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
27
28
29
30
import argparse
import os

from huggingface_hub import snapshot_download


def main():
    parser = argparse.ArgumentParser(
        description="Downloads Polyphemus' pretrained models from Hugging "
        "Face."
    )
    parser.add_argument(
        'models_dir',
        type=str, help='Directory to store the pretrained models.'
    )
    
    args = parser.parse_args()
    
    repo_id = 'EmanueleCosenza/polyphemus'

    r = snapshot_download(
        repo_id=repo_id,
        local_dir=args.models_dir,
        local_dir_use_symlinks=False    
    )
    print("Models successfully downloaded in {}".format(r))


if __name__ == '__main__':
    main()