Spaces:
Runtime error
Runtime error
A newer version of the Gradio SDK is available: 6.24.0
metadata
title: Chess Assist
emoji: ♟️
colorFrom: gray
colorTo: green
sdk: gradio
sdk_version: 4.44.1
app_file: app.py
pinned: false
Chess Assist (v3): Image → FEN → Best Move
This bundle is hardened for Hugging Face Spaces:
- apt.txt installs system
stockfish. - requirements.txt pins CPU Torch wheels for Ultralytics.
- Better error messages in UI to surface what's failing (model download, engine path, etc.).
Deploy Steps
- Create a new Space (Gradio, Python).
- Upload:
app.py,requirements.txt,apt.txt,runtime.txt,README.md. - In Space Settings → Space hardware, choose CPU Basic (enough for this demo).
- In Space Settings → Networking, ensure "Allow internet access" is ON so the YOLO weights can download.
- Commit and wait for build. First run will download the YOLO weights.
Common Issues
- Ultralytics / Torch errors: We pinned Torch CPU wheels. If still failing, change runtime to Python 3.10 (provided here).
- Stockfish not found:
apt.txtshould install it. If still missing, check build logs and confirm/usr/bin/stockfishexists. - No opening name: Many midgame positions have no named opening; this is normal.
- Board not detected: Try a straighter photo with the board filling the frame; glare can confuse corner detection.
Local Run
python -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
python app.py
Notes
- Labels assumed like
wpawn,bqueen, etc. AdjustLABEL_TO_FENif your detector uses different names. - Evaluation score is kept internal per your specs; only a simple explanation is shown.