Spaces:
Runtime error
Runtime error
# Base image | |
FROM python:3.10-slim | |
# Set working directory | |
WORKDIR /app | |
# Install system deps if needed (optional, but useful for datasets) | |
RUN apt-get update && apt-get install -y git | |
# Copy requirements first (better caching) | |
COPY requirements.txt . | |
# Install dependencies | |
RUN pip install --no-cache-dir -r requirements.txt | |
# Copy app code | |
COPY app_NER.py . | |
# Copy model file | |
COPY crf_model.pkl . | |
# Expose port | |
EXPOSE 7860 | |
# Start FastAPI with uvicorn | |
CMD ["uvicorn", "app_NER:app", "--host", "0.0.0.0", "--port", "7860"] | |