gauravlochab
chore: Add requirements.txt and restart scripts
322b74c
raw
history blame contribute delete
644 Bytes
name: Restart Hugging Face Space
on:
schedule:
- cron: '30 18 * * *'
workflow_dispatch: # Runs every 30 minutes
jobs:
restart-space:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.8'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install huggingface_hub
- name: Restart Hugging Face Space
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
run: python restart_space.py