Togmal-demo / deploy_helper.sh
HeTalksInMaths
Togmal Demo - Auto-build vector DB on launch
d97cc93
#!/bin/bash
# Quick decision helper
echo "==================================================================="
echo "πŸš€ Hugging Face Deployment - Choose Your Path"
echo "==================================================================="
echo ""
echo "You have TWO options to fix the push rejection:"
echo ""
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo "OPTION 1: Fresh Start (RECOMMENDED)"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo ""
echo "βœ… Pros:"
echo " β€’ Simplest (just 3 commands)"
echo " β€’ No additional tools needed"
echo " β€’ Guaranteed to work"
echo " β€’ Clean, small repository"
echo ""
echo "⚠️ Cons:"
echo " β€’ Loses git commit history"
echo " β€’ (Probably fine for a demo project)"
echo ""
echo "πŸ“ Commands:"
echo " ./fresh_repo.sh"
echo " git remote add origin https://huggingface.co/spaces/JustTheStatsHuman/Togmal-demo"
echo " git push origin main --force"
echo ""
echo ""
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo "OPTION 2: Clean History (Advanced)"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo ""
echo "βœ… Pros:"
echo " β€’ Keeps full commit history"
echo " β€’ More 'proper' git workflow"
echo ""
echo "⚠️ Cons:"
echo " β€’ Requires installing git-filter-repo"
echo " β€’ More complex"
echo " β€’ Takes longer"
echo ""
echo "πŸ“ Commands:"
echo " brew install git-filter-repo # Install tool"
echo " ./clean_git_history.sh # Clean history"
echo " git remote add origin https://huggingface.co/spaces/JustTheStatsHuman/Togmal-demo"
echo " git push origin main --force"
echo ""
echo ""
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo "πŸ’‘ RECOMMENDATION FOR YOU"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo ""
echo "Since you're pitching to VCs and need this deployed quickly:"
echo ""
echo "πŸ‘‰ Use OPTION 1 (Fresh Start)"
echo ""
echo "Why?"
echo "β€’ You're a solo founder - speed matters"
echo "β€’ This is a demo - commit history isn't critical"
echo "β€’ Gets you to deployment in 2 minutes vs 10"
echo "β€’ Same end result - working demo on Hugging Face"
echo ""
echo ""
echo "Current repository status:"
git status --short | head -5
echo ""
echo "Large files excluded in .gitignore:"
cat .gitignore | grep -v "^#" | grep -v "^$"
echo ""
echo "==================================================================="
echo ""
read -p "Press Enter to see the exact commands for Option 1..."
echo ""
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo "COPY & PASTE THESE COMMANDS (Option 1):"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo ""
echo "# Step 1: Create fresh repository"
echo "./fresh_repo.sh"
echo ""
echo "# Step 2: Add Hugging Face remote"
echo "git remote add origin https://huggingface.co/spaces/JustTheStatsHuman/Togmal-demo"
echo ""
echo "# Step 3: Push to Hugging Face"
echo "git push origin main --force"
echo ""
echo "# Step 4: Watch it deploy!"
echo "# Visit: https://huggingface.co/spaces/JustTheStatsHuman/Togmal-demo"
echo ""
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo ""
echo "⏱️ First launch will take ~3-5 minutes to build the vector database"
echo "🎯 After that, demo will be instant!"
echo ""