feat: on-demand AI feature install with progress indicators

This commit is contained in:
ashim-hq
2026-04-19 19:52:14 +08:00
parent 771f786528
commit 10bdc24a4a
9 changed files with 488 additions and 225 deletions
+6 -1
View File
@@ -252,7 +252,12 @@ def download_hf_snapshot(model: dict, models_dir: str) -> None:
return
from huggingface_hub import snapshot_download
snapshot_download(repo_id=repo_id, local_dir=local_dir, repo_type=repo_type)
kwargs: dict = {"repo_id": repo_id, "local_dir": local_dir, "repo_type": repo_type}
if target_file:
kwargs["allow_patterns"] = [target_file]
snapshot_download(**kwargs)
# Verify file size if applicable
if target_file and min_size > 0: