Spaces:
Sleeping
Sleeping
| # 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!" |