Skip to content

Commit

Permalink
Publish wasm to model scope (#309)
Browse files Browse the repository at this point in the history
  • Loading branch information
csukuangfj authored Feb 21, 2024
1 parent 04a3e1c commit c31e673
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/wasm-simd-hf-space-en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,40 @@ jobs:
name: sherpa-ncnn-wasm-simd-en
path: ./sherpa-ncnn-wasm-simd-*.tar.bz2

- name: Publish to ModelScope
env:
MS_TOKEN: ${{ secrets.MODEL_SCOPE_GIT_TOKEN }}
uses: nick-fields/retry@v2
with:
max_attempts: 20
timeout_seconds: 200
shell: bash
command: |
SHERPA_NCNN_VERSION=v$(grep "SHERPA_NCNN_VERSION" ./CMakeLists.txt | cut -d " " -f 2 | cut -d '"' -f 2)
git config --global user.email "csukuangfj@gmail.com"
git config --global user.name "Fangjun Kuang"
rm -rf huggingface
export GIT_LFS_SKIP_SMUDGE=1
git clone http://www.modelscope.cn/studios/k2-fsa/web-assembly-asr-sherpa-ncnn-en.git ms
cd ms
git fetch
git pull
git merge -m "merge remote" --ff origin main
cp -v ../sherpa-ncnn-wasm-simd-${SHERPA_NCNN_VERSION}/* .
git status
git lfs track "*.data"
git lfs track "*.wasm"
git add .
git commit -m "update model"
git push http://oauth2:$MS_TOKEN@www.modelscope.cn/studios/k2-fsa/web-assembly-asr-sherpa-ncnn-en.git
- name: Publish to huggingface
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/wasm-simd-hf-space-zh-en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,40 @@ jobs:
name: sherpa-ncnn-wasm-simd-zh-en
path: ./sherpa-ncnn-wasm-simd-*.tar.bz2

- name: Publish to ModelScope
env:
MS_TOKEN: ${{ secrets.MODEL_SCOPE_GIT_TOKEN }}
uses: nick-fields/retry@v2
with:
max_attempts: 20
timeout_seconds: 200
shell: bash
command: |
SHERPA_NCNN_VERSION=v$(grep "SHERPA_NCNN_VERSION" ./CMakeLists.txt | cut -d " " -f 2 | cut -d '"' -f 2)
git config --global user.email "csukuangfj@gmail.com"
git config --global user.name "Fangjun Kuang"
rm -rf huggingface
export GIT_LFS_SKIP_SMUDGE=1
git clone http://www.modelscope.cn/studios/k2-fsa/web-assembly-asr-sherpa-ncnn-zh-en.git ms
cd ms
git fetch
git pull
git merge -m "merge remote" --ff origin main
cp -v ../sherpa-ncnn-wasm-simd-${SHERPA_NCNN_VERSION}/* .
git status
git lfs track "*.data"
git lfs track "*.wasm"
git add .
git commit -m "update model"
git push http://oauth2:$MS_TOKEN@www.modelscope.cn/studios/k2-fsa/web-assembly-asr-sherpa-ncnn-zh-en.git
- name: Publish to huggingface
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
Expand Down

0 comments on commit c31e673

Please sign in to comment.