Spaces:
Paused
Paused
File size: 1,589 Bytes
eff8aa5 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
#!/bin/bash
# Quick setup script for HF Spaces deployment
echo "π Setting up InsightPilot for Hugging Face Spaces deployment"
echo ""
# Check if we should build frontend
read -p "Build React frontend? (y/n - takes a few minutes): " build_frontend
if [ "$build_frontend" = "y" ] || [ "$build_frontend" = "Y" ]; then
echo "π¦ Building frontend..."
cd frontend
npm install
npm run build
cd ..
echo "β
Frontend built successfully!"
else
echo "βοΈ Skipping frontend build (app will work without it)"
fi
echo ""
echo "π Next steps:"
echo ""
echo "1. Create a new Space on Hugging Face:"
echo " β https://huggingface.co/new-space"
echo " β Choose SDK: Gradio"
echo " β Choose Hardware: CPU basic (free)"
echo ""
echo "2. Clone your new Space:"
echo " git clone https://huggingface.co/spaces/YOUR_USERNAME/SPACE_NAME"
echo ""
echo "3. Copy files to your Space:"
echo " cp app.py YOUR_SPACE/"
echo " cp requirements.txt YOUR_SPACE/"
echo " cp README_HF.md YOUR_SPACE/README.md"
echo " cp -r backend YOUR_SPACE/"
echo " cp -r data YOUR_SPACE/"
if [ "$build_frontend" = "y" ] || [ "$build_frontend" = "Y" ]; then
echo " cp -r frontend/dist YOUR_SPACE/frontend/dist"
fi
echo ""
echo "4. Push to Hugging Face:"
echo " cd YOUR_SPACE"
echo " git add ."
echo " git commit -m 'Initial deployment'"
echo " git push"
echo ""
echo "5. Add your GROQ_API_KEY in Space Settings β Repository secrets"
echo ""
echo "π Full deployment guide: See DEPLOYMENT.md"
echo ""
echo "β¨ Done! Ready to deploy to Hugging Face Spaces!"
|