Initial commit: OCR receipt extractor

This commit is contained in:
root
2026-04-02 11:41:05 +02:00
commit 73b53d66b1
5 changed files with 280 additions and 0 deletions

23
Dockerfile Normal file
View File

@@ -0,0 +1,23 @@
FROM python:3.12-slim
# Installa tesseract-ocr con lingua italiana e inglese
RUN apt-get update && \
apt-get install -y --no-install-recommends \
tesseract-ocr \
tesseract-ocr-ita \
tesseract-ocr-eng \
libgl1 \
curl \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY extract_receipt.py .
EXPOSE 5000
# Avvia con gunicorn in produzione
CMD ["gunicorn", "--bind", "0.0.0.0:5000", "--workers", "2", "--timeout", "120", "extract_receipt:app"]