mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
feat: on-demand AI feature install with progress indicators
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user