superKartapi / deploy.sh
itsjarvis's picture
Upload deploy.sh with huggingface_hub
6da28b4 verified
#!/bin/bash
# Hugging Face Space Deployment Script
# ====================================
echo "[DEPLOY] Starting Hugging Face Space deployment..."
# Check if we're in a git repository
if [ ! -d ".git" ]; then
echo "Error: Not in a git repository. Please clone your HF space first."
exit 1
fi
# Copy backend files (run from project root)
echo "[DEPLOY] Copying backend files..."
if [ -d "../backend_files" ]; then
cp -r ../backend_files/* .
echo "✅ Backend files copied successfully"
else
echo "Error: backend_files directory not found"
exit 1
fi
# Stage all files
echo "[DEPLOY] Staging files..."
git add .
# Commit changes
echo "[DEPLOY] Committing changes..."
git commit -m "Deploy SuperKart Sales Forecasting API v1.0"
# Push to Hugging Face
echo "[DEPLOY] Pushing to Hugging Face..."
git push origin main
echo "[DEPLOY] Deployment complete! Check your space for build status."
echo "[INFO] Your API will be available at: https://yourusername-spacename.hf.space"