Spaces:
Runtime error
Runtime error
# Deployment script for Hugging Face Spaces | |
# This script helps prepare your app for deployment to Hugging Face Spaces | |
echo "🚀 Preparing Visual Image Search for Hugging Face Spaces deployment..." | |
# Check if required files exist | |
echo "📋 Checking required files..." | |
files=("Dockerfile" "requirements.txt" "app.py" "README.md") | |
for file in "${files[@]}"; do | |
if [[ -f "$file" ]]; then | |
echo "✅ $file exists" | |
else | |
echo "❌ $file is missing!" | |
exit 1 | |
fi | |
done | |
# Check if directories exist | |
echo "📁 Checking required directories..." | |
dirs=("static" "templates" "config") | |
for dir in "${dirs[@]}"; do | |
if [[ -d "$dir" ]]; then | |
echo "✅ $dir directory exists" | |
else | |
echo "❌ $dir directory is missing!" | |
exit 1 | |
fi | |
done | |
echo "🔧 Configuration Summary:" | |
echo "- App configured for port 7860 ✅" | |
echo "- Docker configured for Hugging Face Spaces ✅" | |
echo "- README.md has proper frontmatter ✅" | |
echo "- Requirements pinned to specific versions ✅" | |
echo "- Cross-platform file system support ✅" | |
echo "- Local Qdrant storage fallback ✅" | |
echo "" | |
echo "🎯 Next Steps for Deployment:" | |
echo "1. Create a new Space on Hugging Face Hub (https://huggingface.co/new-space)" | |
echo "2. Choose 'Docker' as the SDK" | |
echo "3. Upload/push all files to your Space repository" | |
echo "4. Your app will be available at: https://huggingface.co/spaces/YOUR_USERNAME/YOUR_SPACE_NAME" | |
echo "" | |
echo "💡 Optional: Set environment variables in Space settings if using Qdrant Cloud:" | |
echo " - QDRANT_URL: Your Qdrant cloud URL" | |
echo " - QDRANT_API_KEY: Your Qdrant API key" | |
echo "" | |
echo "✨ Your Visual Image Search app is ready for deployment!" | |