ubuti's picture
Upload folder using huggingface_hub
61f167f verified
Raw
History Blame Contribute Delete
1.01 kB
name: Sync with Hugging Face
on:
push:
branches:
- main
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
lfs: true
- name: Install Git LFS
run: |
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash
sudo apt-get install git-lfs
git lfs install
- name: Configure git
run: |
git config --global user.email "simon@roske.com"
git config --global user.name "ubuti"
- name: Install huggingface-hub
run: pip install huggingface-hub
- name: Sync to Hugging Face
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
run: |
git remote remove hf 2>/dev/null || true
git remote add hf https://ubuti:${HF_TOKEN}@huggingface.co/spaces/ubuti/MRI_tumor_classification
git push hf HEAD:main --force --no-thin