ubuti's picture
Upload folder using huggingface_hub
34662a5 verified
Raw
History Blame Contribute Delete
756 Bytes
name: Deploy to Hugging Face Spaces
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
lfs: true
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Log in to Hugging Face
run: |
python -c 'import huggingface_hub; huggingface_hub.login(token="${{ secrets.HF_TOKEN }}")'
- name: Deploy to Spaces
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
run: |
gradio deploy