#!/bin/bash # Ad Reflections - Hugging Face Deployment Script echo "🚀 Ad Reflections Deployment Script" echo "==========================================" # Check if username is provided if [ -z "$1" ]; then echo "❌ Error: Please provide your Hugging Face username" echo "Usage: ./deploy.sh YOUR_USERNAME" exit 1 fi USERNAME=$1 SPACE_NAME="transcreation-explorer" SPACE_URL="https://huggingface.co/spaces/$USERNAME/$SPACE_NAME" echo "👤 Username: $USERNAME" echo "📦 Space: $SPACE_NAME" echo "🌐 URL: $SPACE_URL" echo "" # Update README.md with correct username echo "📝 Updating README.md with your username..." sed -i.bak "s/YOUR_USERNAME/$USERNAME/g" README.md rm README.md.bak 2>/dev/null || true echo "✅ README.md updated" # Check if we're in a git repository if [ ! -d ".git" ]; then echo "📂 Initializing git repository..." git init git remote add origin https://huggingface.co/spaces/$USERNAME/$SPACE_NAME else echo "📂 Git repository detected" fi # Add all files echo "📁 Adding files to git..." git add . # Commit changes echo "💾 Committing changes..." git commit -m "Deploy Ad Reflections to Hugging Face Spaces" # Push to Hugging Face echo "🚀 Pushing to Hugging Face Spaces..." git push origin main echo "" echo "✅ Deployment initiated!" echo "🔗 Your space will be available at: $SPACE_URL" echo "⏳ Build typically takes 5-10 minutes" echo "📊 Monitor build progress in the 'Logs' tab" echo "" echo "🎉 Happy transcreating!"