File tree Expand file tree Collapse file tree 1 file changed +19
-21
lines changed
Expand file tree Collapse file tree 1 file changed +19
-21
lines changed Original file line number Diff line number Diff line change 1- name : Run Python script
1+ name : Deploy to Hugging Face Spaces
22
33on :
44 push :
5- branches :
6- - main
5+ branches : [main]
76
87jobs :
9- build :
8+ deploy :
109 runs-on : ubuntu-latest
11-
1210 steps :
13- - name : Checkout
14- uses : actions/checkout@v2
15-
16- - name : Set up Python
17- uses : actions/setup- python@v2
18- with :
19- python-version : ' 3.12.8 '
20-
21- - name : Install Gradio
22- run : python -m pip install gradio
23-
24- - name : Log in to Hugging Face
25- run : python -c 'import huggingface_hub; huggingface_hub.login(token="${{ secrets.hf_token }}")'
26-
27- - name : Deploy to Spaces
28- run : gradio deploy
11+ - uses : actions/checkout@v3
12+ - name : Set up Python
13+ uses : actions/setup-python@v4
14+ with :
15+ python-version : ' 3.12.8 '
16+ - name : Install dependencies
17+ run : |
18+ python -m pip install --upgrade pip
19+ pip install huggingface_hub gradio
20+ - name : Login to Hugging Face
21+ run : |
22+ echo ${{ secrets.HF_TOKEN }} | huggingface-cli login
23+ - name : Deploy to Spaces
24+ run : |
25+ # Use --yes to automatically accept prompts
26+ gradio deploy --yes
You can’t perform that action at this time.
0 commit comments