custom-GNN-LLM-VLM / scripts /load_artifacts.py
zarifbinakhtar's picture
Upload 37 files
d08dded verified
Raw History Blame Contribute Delete
1.05 kB
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()