File tree Expand file tree Collapse file tree 1 file changed +15
-4
lines changed
Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -12,15 +12,26 @@ jobs:
1212 - name : Set up Python
1313 uses : actions/setup-python@v4
1414 with :
15- python-version : ' 3.12.8 '
15+ python-version : ' 3.10 '
1616 - name : Install dependencies
1717 run : |
1818 python -m pip install --upgrade pip
19- pip install huggingface_hub gradio
19+ pip install huggingface_hub
2020 - name : Login to Hugging Face
2121 run : |
2222 echo ${{ secrets.HF_TOKEN }} | huggingface-cli login
2323 - name : Deploy to Spaces
2424 run : |
25- # Use --yes to automatically accept prompts
26- gradio deploy --yes
25+ # Create space.yml if it doesn't exist
26+ if [ ! -f "space.yml" ]; then
27+ echo "title: Q-Learning GridWorld Simulator" > space.yml
28+ echo "emoji: 🤖" >> space.yml
29+ echo "colorFrom: blue" >> space.yml
30+ echo "colorTo: green" >> space.yml
31+ echo "sdk: gradio" >> space.yml
32+ echo "sdk_version: 4.0.0" >> space.yml
33+ echo "app_file: rl_gradio.py" >> space.yml
34+ fi
35+ # Push to Hugging Face Space
36+ huggingface-cli repo create fahmizainal17/Q-Learning_GridWorld_Simulator --type space || true
37+ huggingface-cli upload fahmizainal17/Q-Learning_GridWorld_Simulator * --repo-type space
You can’t perform that action at this time.
0 commit comments