# Use a lightweight Python image FROM python:3.9-slim # Set working directory WORKDIR /app # Install dependencies COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Copy application code COPY . . # Model is pre-uploaded as .pickle, no training needed during build # Expose port (standard for HF Spaces) EXPOSE 7860 # Run the application CMD ["gunicorn", "--bind", "0.0.0.0:7860", "--workers", "1", "--threads", "8", "--timeout", "0", "app:app"]