Spaces:
Sleeping
Sleeping
File size: 1,617 Bytes
97637c6 |
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 |
#!/bin/bash
# Quick deployment script for Hugging Face Spaces
echo "π Deploying IntegraChat to Hugging Face Spaces"
echo ""
# Check if git is initialized
if [ ! -d ".git" ]; then
echo "π¦ Initializing git repository..."
git init
fi
# Get space name from user or use default
read -p "Enter your Hugging Face username: " HF_USERNAME
read -p "Enter your Space name (default: integrachat): " SPACE_NAME
SPACE_NAME=${SPACE_NAME:-integrachat}
# Set remote URL
HF_REMOTE="https://huggingface.co/spaces/${HF_USERNAME}/${SPACE_NAME}"
echo ""
echo "π Adding files to git..."
git add Dockerfile .dockerignore README_HF_SPACES.md requirements.txt app.py env.example LICENSE README.md assets/ backend/ scripts/ 2>/dev/null || true
# Check if there are changes to commit
if git diff --staged --quiet; then
echo "β οΈ No changes to commit. Files may already be committed."
else
echo "πΎ Committing changes..."
git commit -m "Deploy IntegraChat to Hugging Face Spaces"
fi
echo ""
echo "π Setting up remote..."
git remote remove hf 2>/dev/null || true
git remote add hf "$HF_REMOTE"
echo ""
echo "π€ Pushing to Hugging Face..."
echo " Remote: $HF_REMOTE"
echo ""
read -p "Press Enter to continue with push, or Ctrl+C to cancel..."
git push hf main || git push hf master
echo ""
echo "β
Deployment initiated!"
echo ""
echo "π Next steps:"
echo " 1. Go to: $HF_REMOTE"
echo " 2. Click 'Settings' tab"
echo " 3. Add environment variables in 'Repository secrets'"
echo " 4. Wait for build to complete (5-10 minutes)"
echo " 5. Check 'Logs' tab for build progress"
echo ""
|