Product-ai / deploy.sh
Parimal Kalpande
deploy
db70c95
#!/bin/bash
# πŸš€ AI Product Coach - Hugging Face Deployment Script
# This script helps prepare your app for Hugging Face Spaces deployment
echo "🎯 AI Product Coach - Hugging Face Deployment Preparation"
echo "=========================================================="
# Check if we're in the right directory
if [ ! -f "app.py" ]; then
echo "❌ Error: app.py not found. Please run this script from the project root directory."
exit 1
fi
echo "βœ… Found app.py - you're in the right directory"
# Check for required files
required_files=("app.py" "config.py" "requirements.txt" "README.md")
missing_files=()
for file in "${required_files[@]}"; do
if [ ! -f "$file" ]; then
missing_files+=("$file")
fi
done
if [ ${#missing_files[@]} -ne 0 ]; then
echo "❌ Missing required files: ${missing_files[*]}"
exit 1
fi
echo "βœ… All required files present"
# Check for modules directory
if [ ! -d "modules" ]; then
echo "❌ Error: modules/ directory not found"
exit 1
fi
echo "βœ… Found modules directory"
# Check if README has HF metadata
if ! grep -q "title: AI Product Coach" README.md; then
echo "⚠️ Warning: README.md missing Hugging Face metadata"
echo " The metadata header has already been added to your README.md"
fi
echo "βœ… README.md has proper HF metadata"
# Check for API key configuration
if ! grep -q "GROQ_API_KEY" config.py; then
echo "❌ Error: GROQ_API_KEY configuration not found in config.py"
exit 1
fi
echo "βœ… API key configuration found"
# Display next steps
echo ""
echo "πŸŽ‰ Deployment Preparation Complete!"
echo ""
echo "Next Steps:"
echo "1. Get your Groq API key from: https://console.groq.com/keys"
echo "2. Create a new Hugging Face Space at: https://huggingface.co/spaces"
echo "3. Upload all files to your Space (or use git clone/push)"
echo "4. Set GROQ_API_KEY as environment variable in Space settings"
echo "5. Wait for build to complete and test your app!"
echo ""
echo "πŸ“š See DEPLOYMENT.md for detailed instructions"
echo ""
echo "Your AI Product Coach is ready for deployment! πŸš€"