Spaces:
Sleeping
Sleeping
| # π 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! π" | |