Spaces:
Sleeping
Sleeping
File size: 1,514 Bytes
341919b 3f4cb51 341919b 3f4cb51 341919b 3f4cb51 341919b | 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 54 55 56 57 58 | #!/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!" |