| # Carsa AI Hugging Face Deployment Script | |
| echo "π Deploying Carsa AI to Hugging Face Spaces..." | |
| # Ensure we're in the right directory | |
| cd "$(dirname "$0")" | |
| # Check if git is initialized | |
| if [ ! -d ".git" ]; then | |
| echo "π Initializing git repository..." | |
| git init | |
| fi | |
| # Copy the HF-optimized requirements | |
| cp requirements-hf.txt requirements.txt | |
| # Add all files | |
| echo "π¦ Adding files to git..." | |
| git add . | |
| # Commit changes | |
| echo "πΎ Committing changes..." | |
| git commit -m "Deploy Carsa AI Backend to Hugging Face Spaces" | |
| # Add HF remote (you'll need to update this with your actual space URL) | |
| echo "π Adding Hugging Face remote..." | |
| echo "β οΈ IMPORTANT: Update the remote URL with your actual Hugging Face Space" | |
| echo " Example: git remote add origin https://huggingface.co/spaces/YOUR_USERNAME/carsa-ai" | |
| # Instructions for user | |
| echo "" | |
| echo "β Deployment files ready!" | |
| echo "" | |
| echo "π§ Next steps:" | |
| echo "1. Create your Hugging Face Space" | |
| echo "2. Copy the git remote URL" | |
| echo "3. Run: git remote add origin [YOUR_HF_SPACE_URL]" | |
| echo "4. Run: git push origin main" | |
| echo "" | |
| echo "π Your API will be live at: https://YOUR_USERNAME-carsa-ai.hf.space" | |