Spaces:
Running
Running
name: Deploy Gradio App | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.12.3' # Specify the Python version you are using | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt # Ensure you have a requirements.txt file | |
- name: Login to Hugging Face | |
env: | |
HUGGINGFACE_TOKEN: ${{ secrets.HUGGING_FACE_TOKEN }} | |
run: | | |
huggingface-cli login --token $HUGGINGFACE_TOKEN | |
- name: Deploy Gradio App | |
env: | |
HUGGINGFACE_TOKEN: ${{ secrets.HUGGING_FACE_TOKEN }} | |
run: gradio deploy | |
# - name: Upload to Hugging Face Spaces | |
# env: | |
# HF_TOKEN: ${{ secrets.HUGGING_FACE_TOKEN }} | |
# run: | | |
# git lfs install | |
# huggingface-cli lfs-enable-largefiles . | |
# huggingface-cli repo create reviewerarena/reviewer-arena --type=space | |
# huggingface-cli repo upload reviewerarena/reviewer-arena . --all-yes | |
# - name: Login to Hugging Face | |
# env: | |
# HUGGINGFACE_TOKEN: ${{ secrets.HUGGING_FACE_TOKEN }} | |
# run: | | |
# echo "$HUGGINGFACE_TOKEN" | huggingface-cli login --token | |
# - name: Deploy Gradio App | |
# env: | |
# HUGGINGFACE_TOKEN: ${{ secrets.HUGGING_FACE_TOKEN }} | |
# run: | | |
# gradio deploy --token $HUGGINGFACE_TOKEN |