santoshsiddegowda's picture
Upload folder using huggingface_hub
29a3552 verified
#!/bin/bash
# FastRTC Deployment Script to Hugging Face Spaces
# This script deploys your app permanently to Hugging Face Spaces
echo "πŸš€ Deploying Bizom Voice Assistant to Hugging Face Spaces..."
echo ""
echo "Verifying only necessary files will be uploaded..."
echo ""
# Check that venv is not tracked by git
if git ls-files | grep -q "venv/"; then
echo "⚠️ WARNING: venv/ is tracked by git. This should not be deployed!"
echo " Remove it with: git rm -r --cached venv/"
exit 1
fi
echo "βœ… Only necessary files will be uploaded (venv/ is excluded)"
echo ""
echo "When prompted:"
echo " - Hardware: Press Enter for 'cpu-basic' (free) or choose another option"
echo " - Visibility: Type 'public' or 'private' and press Enter"
echo ""
# Activate virtual environment
source venv/bin/activate
# Deploy with app file specified
# gradio deploy uses git, so it will only upload tracked files
gradio deploy \
--app-file app.py \
--title "Bizom Voice Assistant"
echo ""
echo "βœ… Deployment complete!"
echo ""
echo "πŸ“ Next steps:"
echo " 1. Go to your Space settings on Hugging Face"
echo " 2. Add GEMINI_API_KEY in Settings β†’ Variables and secrets (if needed)"
echo " 3. Your app will be available at: https://YOUR_USERNAME-bizom-voice-assistant.hf.space"