File size: 1,048 Bytes
d08dded
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
import argparse
import os
from huggingface_hub import hf_hub_download, snapshot_download


def main():
    parser = argparse.ArgumentParser(description="Download custom-GNN-LLM-VLM artifacts from Hugging Face Hub")
    parser.add_argument("--repo-id", type=str, default="zarifbinakhtar/custom-GNN-LLM-VLM", help="Hugging Face repo ID")
    parser.add_argument("--local-dir", type=str, default="hf_artifacts", help="Local destination folder")
    parser.add_argument("--file", type=str, default=None, help="Optional single file path inside repo (e.g., configs/pipeline.yaml)")
    args = parser.parse_args()

    os.makedirs(args.local_dir, exist_ok=True)

    if args.file:
        downloaded = hf_hub_download(repo_id=args.repo_id, filename=args.file, local_dir=args.local_dir)
        print(f"Downloaded '{args.file}' to: {downloaded}")
    else:
        snapshot_path = snapshot_download(repo_id=args.repo_id, local_dir=args.local_dir)
        print(f"Downloaded repository snapshot to: {snapshot_path}")


if __name__ == "__main__":
    main()