File size: 1,193 Bytes
d01de5d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
#!/bin/bash

# Carsa AI Hugging Face Deployment Script
echo "πŸš€ Deploying Carsa AI to Hugging Face Spaces..."

# Ensure we're in the right directory
cd "$(dirname "$0")"

# Check if git is initialized
if [ ! -d ".git" ]; then
    echo "πŸ“ Initializing git repository..."
    git init
fi

# Copy the HF-optimized requirements
cp requirements-hf.txt requirements.txt

# Add all files
echo "πŸ“¦ Adding files to git..."
git add .

# Commit changes
echo "πŸ’Ύ Committing changes..."
git commit -m "Deploy Carsa AI Backend to Hugging Face Spaces"

# Add HF remote (you'll need to update this with your actual space URL)
echo "πŸ”— Adding Hugging Face remote..."
echo "⚠️  IMPORTANT: Update the remote URL with your actual Hugging Face Space"
echo "   Example: git remote add origin https://huggingface.co/spaces/YOUR_USERNAME/carsa-ai"

# Instructions for user
echo ""
echo "βœ… Deployment files ready!"
echo ""
echo "πŸ”§ Next steps:"
echo "1. Create your Hugging Face Space"
echo "2. Copy the git remote URL"
echo "3. Run: git remote add origin [YOUR_HF_SPACE_URL]"
echo "4. Run: git push origin main"
echo ""
echo "🌍 Your API will be live at: https://YOUR_USERNAME-carsa-ai.hf.space"