Skip to content

Commit 7880f13

Browse files
committed
Fix model download in test workflow
1 parent c37132b commit 7880f13

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

‎.github/workflows/test.yaml‎

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,18 @@ jobs:
2020
with:
2121
python-version: "3.9"
2222
- name: Install huggingface-hub
23-
run: pip install huggingface-hub
23+
run: python -m pip install huggingface-hub
2424
- name: Download model
25-
run: huggingface-cli download ${{ env.REPO_ID }} ${{ env.MODEL_FILE }}
25+
run: |
26+
python - <<'PY'
27+
import os
28+
from huggingface_hub import hf_hub_download
29+
30+
hf_hub_download(
31+
repo_id=os.environ["REPO_ID"],
32+
filename=os.environ["MODEL_FILE"],
33+
)
34+
PY
2635
- name: Cache model
2736
uses: actions/cache@v4
2837
with:

0 commit comments

Comments
 (0)