import os
from huggingface_hub import snapshot_download

CACHE_DIR = "ENCODERS/hf_cache"
os.makedirs(CACHE_DIR, exist_ok=True)

# Run this only for the first download
snapshot_download("bert-large-uncased", cache_dir=CACHE_DIR, local_dir_use_symlinks=False)
snapshot_download("google/vit-base-patch16-224-in21k", cache_dir=CACHE_DIR, local_dir_use_symlinks=False)
snapshot_download("allenai/longformer-large-4096", cache_dir=CACHE_DIR, local_dir_use_symlinks=False)
snapshot_download("facebook/dinov2-base", cache_dir=CACHE_DIR, local_dir_use_symlinks=False)
