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!"