File size: 1,106 Bytes
67e93c9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9e6cc8a
67e93c9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
31
32
33
34
35
36
37
38
39
40
41
42
43
"""
download_data.py
----------------
Downloads the ODIN runtime data (processed CSVs + ChromaDB knowledge bases)
from Hugging Face Hub into the local data/ directory.

Usage:
    python scripts/download_data.py

Requirements:
    pip install huggingface_hub
"""
import os
import sys
from pathlib import Path

HF_REPO_ID  = "KoopaK/OdinDB"
LOCAL_DIR   = Path(__file__).parent.parent / "data"

def main():
    try:
        from huggingface_hub import snapshot_download
    except ImportError:
        print("huggingface_hub not installed. Run: pip install huggingface_hub")
        sys.exit(1)

    print(f"Downloading ODIN data from HuggingFace ({HF_REPO_ID}) …")
    print(f"Destination: {LOCAL_DIR.resolve()}")
    print("This may take a few minutes (~400 MB knowledge bases + processed CSVs).\n")

    snapshot_download(
        repo_id   = HF_REPO_ID,
        repo_type = "dataset",
        local_dir = str(LOCAL_DIR),
        ignore_patterns=["*.git*", "README.md"],
    )

    print("\nDone. You can now run the app:")
    print("  python src/agents/app.py")

if __name__ == "__main__":
    main()