#!/bin/bash echo "📝 Checking for changes..." if [[ -n $(git status -s) ]]; then echo "✅ Changes detected, committing..." git add . # Prompt for commit message read -p "📝 Commit message (press Enter for default): " commit_msg if [ -z "$commit_msg" ]; then commit_msg="Update $(date '+%Y-%m-%d %H:%M')" fi git commit -m "$commit_msg" else echo "✅ No changes to commit" fi echo "" echo "🚀 Pushing to GitHub..." git push origin main echo "" echo "🚀 Pushing to Hugging Face Spaces..." git push huggingface main --force echo "" echo "✅ Successfully pushed to both GitHub and Hugging Face!" EOF chmod +x push-both.sh