Spaces:
Running
Running
| name: Push Models to HF Generation Space | |
| on: | |
| workflow_dispatch: | |
| jobs: | |
| push-models: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Upload models to HF dataset | |
| run: | | |
| pip install huggingface_hub | |
| python -c " | |
| from huggingface_hub import HfApi | |
| api = HfApi() | |
| api.upload_folder( | |
| repo_id='shdwRow/ailixir-generation-models', | |
| folder_path='ai_apps/generation/bundle/models', | |
| repo_type='dataset', | |
| token='${{ secrets.HF_TOKEN_SHDWROW }}' | |
| ) | |
| print('Models uploaded successfully') | |
| " | |
| - name: Rebuild HF Space with latest models | |
| run: | | |
| curl -X POST \ | |
| "https://huggingface.co/api/spaces/shdwRow/ailixir-generation/restart" \ | |
| -H "Authorization: Bearer ${{ secrets.HF_TOKEN_SHDWROW }}" | |