| # Deploy script for Hugging Face Spaces | |
| # This script helps deploy the ALPR OCR system to Hugging Face | |
| set -e | |
| echo "π Starting deployment to Hugging Face Spaces..." | |
| # Check if git is initialized | |
| if [ ! -d ".git" ]; then | |
| echo "π Initializing git repository..." | |
| git init | |
| git remote add origin https://huggingface.co/spaces/Japhari/alpr-ocr | |
| fi | |
| # Check if git-lfs is installed | |
| if ! command -v git-lfs &> /dev/null; then | |
| echo "β οΈ git-lfs is not installed. Please install it first:" | |
| echo " macOS: brew install git-lfs" | |
| echo " Ubuntu: sudo apt-get install git-lfs" | |
| echo " Windows: https://git-lfs.github.com/" | |
| exit 1 | |
| fi | |
| # Setup git-lfs | |
| echo "π§ Setting up git-lfs..." | |
| git lfs install | |
| git lfs track "*.py" | |
| git lfs track "*.md" | |
| git lfs track "*.txt" | |
| git lfs track "*.toml" | |
| git lfs track "*.yml" | |
| git lfs track "*.yaml" | |
| git lfs track "*.sh" | |
| # Add all files | |
| echo "π Adding files to git..." | |
| git add . | |
| # Commit changes | |
| echo "πΎ Committing changes..." | |
| git commit -m "Update ALPR OCR system - $(date)" | |
| # Push to Hugging Face | |
| echo "π Pushing to Hugging Face Spaces..." | |
| git push origin main | |
| echo "β Deployment completed successfully!" | |
| echo "π Your Space is available at: https://huggingface.co/spaces/Japhari/alpr-ocr" | |
| echo "β³ It may take a few minutes for the changes to appear." | |