File size: 1,718 Bytes
60444f3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
#!/bin/bash
# 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!"