Add Dockerfile for HuggingFace Spaces deployment
Browse filesStreamlit app on port 7860 with Tesseract + Poppler system deps.
Update README frontmatter: sdk: docker.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Dockerfile +29 -0
- README.md +1 -3
Dockerfile
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM python:3.11-slim
|
| 2 |
+
|
| 3 |
+
# System dependencies: Tesseract OCR + Poppler (PDF rendering)
|
| 4 |
+
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 5 |
+
tesseract-ocr \
|
| 6 |
+
poppler-utils \
|
| 7 |
+
libgl1 \
|
| 8 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 9 |
+
|
| 10 |
+
WORKDIR /app
|
| 11 |
+
|
| 12 |
+
# Install Python dependencies first (layer cache)
|
| 13 |
+
COPY requirements.txt .
|
| 14 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 15 |
+
|
| 16 |
+
# Copy application code
|
| 17 |
+
COPY . .
|
| 18 |
+
|
| 19 |
+
# HuggingFace Spaces runs on port 7860
|
| 20 |
+
EXPOSE 7860
|
| 21 |
+
|
| 22 |
+
# Streamlit config: bind to 0.0.0.0:7860, disable CORS/XSRF for Spaces
|
| 23 |
+
ENV STREAMLIT_SERVER_PORT=7860 \
|
| 24 |
+
STREAMLIT_SERVER_ADDRESS=0.0.0.0 \
|
| 25 |
+
STREAMLIT_SERVER_ENABLE_CORS=false \
|
| 26 |
+
STREAMLIT_SERVER_ENABLE_XSRF_PROTECTION=false \
|
| 27 |
+
STREAMLIT_BROWSER_GATHER_USAGE_STATS=false
|
| 28 |
+
|
| 29 |
+
CMD ["streamlit", "run", "app.py"]
|
README.md
CHANGED
|
@@ -3,9 +3,7 @@ title: TenderIQ
|
|
| 3 |
emoji: ⚖️
|
| 4 |
colorFrom: blue
|
| 5 |
colorTo: indigo
|
| 6 |
-
sdk:
|
| 7 |
-
sdk_version: 1.39.0
|
| 8 |
-
app_file: app.py
|
| 9 |
pinned: true
|
| 10 |
license: agpl-3.0
|
| 11 |
short_description: Explainable AI for Government Tender Evaluation (CRPF Hackathon)
|
|
|
|
| 3 |
emoji: ⚖️
|
| 4 |
colorFrom: blue
|
| 5 |
colorTo: indigo
|
| 6 |
+
sdk: docker
|
|
|
|
|
|
|
| 7 |
pinned: true
|
| 8 |
license: agpl-3.0
|
| 9 |
short_description: Explainable AI for Government Tender Evaluation (CRPF Hackathon)
|