File size: 631 Bytes
dc74bdb 64a9103 19a72a5 64a9103 19a72a5 64a9103 dc74bdb 64a9103 dc74bdb 64a9103 dc74bdb 64a9103 dc74bdb | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | FROM python:3.9-slim
# Install system dependencies (Poppler for pdf2image + Tesseract for OCR)
RUN apt-get update && apt-get install -y \
poppler-utils \
tesseract-ocr \
tesseract-ocr-hin \
&& rm -rf /var/lib/apt/lists/*
# Set working directory
WORKDIR /app
# Copy requirements and install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy app code and model
COPY . .
# Expose port (Hugging Face Spaces uses 7860 by default)
EXPOSE 7860
# Run the app using python -m uvicorn
CMD ["python", "-m", "uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"] |