Download src/download_model.py from DanielNguyen121/IsSynth-Cars: direct link, hf CLI and curl.
- Browser
- Download file 518 Bytes
-
https://huggingface.co/DanielNguyen121/IsSynth-Cars/resolve/main/src/download_model.py
- Command line
-
hf download hf://DanielNguyen121/IsSynth-Cars/src/download_model.py
-
curl -L -o download_model.py https://huggingface.co/DanielNguyen121/IsSynth-Cars/resolve/main/src/download_model.py
518 Bytes
| from huggingface_hub import snapshot_download,HfApi | |
| from pathlib import Path | |
| import os,json | |
| repo='Qwen/Qwen3-VL-Embedding-2B' | |
| api=HfApi(token=os.environ.get('HF_TOKEN')) | |
| info=api.model_info(repo) | |
| p=Path(snapshot_download(repo_id=repo,local_dir='/marimo/IsSynth-Cars/data/model',token=os.environ.get('HF_TOKEN'))) | |
| Path('/marimo/IsSynth-Cars/data/model_state.json').write_text(json.dumps({'repo':repo,'revision':info.sha,'path':str(p),'files':len(list(p.rglob('*')))},indent=2)) | |
| print('MODEL_READY',info.sha,flush=True) | |