ailixir-api / .github /workflows /push-models-to-hf.yml
AILIXIR Bot
Auto-sync: 201d269f287526269b8ffded5f450ff36b46c740
907b200
Raw
History Blame Contribute Delete
905 Bytes
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 }}"