alpr-ocr / deploy.sh
Japhari's picture
Convert to Gradio and add complete ALPR OCR system
726a8a2
Raw
History Blame Contribute Delete
1.35 kB
#!/bin/bash
# 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."