# Use lightweight Python base image FROM python:3.10-slim # Set working directory WORKDIR /app # Copy dependency list COPY requirements.txt . # Install dependencies RUN pip install --no-cache-dir -r requirements.txt # Copy all project files COPY . . # Expose the port EXPOSE 7860 # Start Flask with Gunicorn on port 7860 (Spaces expects this port) CMD ["gunicorn", "-b", "0.0.0.0:7860", "app:app"]