tattoo_search_engine / DEPLOYMENT.md
onurcopur's picture
first commit
f761027

Hugging Face Spaces Deployment Guide

Environment Variables

Required Secrets

Set these in your Hugging Face Space settings:

  1. HF_TOKEN: Your Hugging Face access token

Hardware Requirements

  • Recommended: T4 Small or higher for optimal performance
  • Minimum: CPU (slower inference)
  • Memory: At least 8GB RAM recommended
  • Storage: 10GB+ for model caching

Deployment Steps

  1. Push all files to your HF Space repository:

    git add .
    git commit -m "Deploy tattoo search engine"
    git push
    
  2. Set the HF_TOKEN secret in Space settings

  3. The Space will automatically build and deploy

Testing

Once deployed, test these endpoints:

  • GET /health - Health check
  • GET /models - Available models
  • POST /search - Upload image and search

Troubleshooting

Common Issues:

  1. Missing HF_TOKEN: Set the token in Space secrets
  2. Model loading errors: Check hardware requirements
  3. Timeout errors: Consider upgrading to GPU hardware
  4. Memory errors: Upgrade to larger hardware tier

Logs:

Check the Space logs for detailed error messages and startup information.