Skip to content

Commit

Permalink
upload to huggingface
Browse files Browse the repository at this point in the history
  • Loading branch information
csukuangfj committed Apr 9, 2024
1 parent c48a67f commit 6a60cec
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
6 changes: 3 additions & 3 deletions .github/scripts/audioset/AT/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,11 @@ function test_pretrained() {
done

log "prepare data for uploading to huggingface"
dst=/icefall/onnx-model
dst=/icefall/model-onnx
mkdir -p $dst
cp -v $repo/*.onnx $dst/
cp -v $repo/exp/*.onnx $dst/
cp -v $repo/data/* $dst/
cp -a $repo/test_wavs $dst
cp -av $repo/test_wavs $dst

ls -lh $dst
ls -lh $dst/test_wavs
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/audioset.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ jobs:
ls -lh ./model-onnx/*
- name: Upload model to huggingface
if: matrix.python-version == '3.9' && matrix.torch-version == '2.2.0'
if: matrix.python-version == '3.9' && matrix.torch-version == '2.2.0' && github.event_name == 'push'
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
uses: nick-fields/retry@v3
Expand Down Expand Up @@ -110,11 +110,11 @@ jobs:
git commit -m "update models"
git status
git push https://csukuangfj:[email protected]/sherpa-onnx-zipformer-audio-tagging-2024-04-09 main || true
git push https://csukuangfj:[email protected]/k2-fsa/sherpa-onnx-zipformer-audio-tagging-2024-04-09 main || true
rm -rf huggingface
- name: Prepare for release
if: matrix.python-version == '3.9' && matrix.torch-version == '2.2.0'
if: matrix.python-version == '3.9' && matrix.torch-version == '2.2.0' && github.event_name == 'push'
shell: bash
run: |
d=sherpa-onnx-zipformer-audio-tagging-2024-04-09
Expand All @@ -123,8 +123,7 @@ jobs:
ls -lh
- name: Release exported onnx models
# if: matrix.python-version == '3.9' && matrix.torch-version == '2.2.0' && github.event_name == 'push'
if: matrix.python-version == '3.9' && matrix.torch-version == '2.2.0'
if: matrix.python-version == '3.9' && matrix.torch-version == '2.2.0' && github.event_name == 'push'
uses: svenstaro/upload-release-action@v2
with:
file_glob: true
Expand Down

0 comments on commit 6a60cec

Please sign in to comment.