FROM python:3.11-slim # Install poppler-utils (required by pdf2image for PDF → PNG conversion) RUN apt-get update && apt-get install -y --no-install-recommends \ poppler-utils \ && rm -rf /var/lib/apt/lists/* WORKDIR /app # Install dependencies COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Copy app files COPY app.py . COPY index.html . # HF Spaces expects the app on port 7860 EXPOSE 7860 CMD ["python", "app.py"]