Spaces:
Sleeping
Sleeping
| FROM python:3.11-slim | |
| # System deps for Pillow / TensorFlow | |
| RUN apt-get update && apt-get install -y \ | |
| build-essential \ | |
| libglib2.0-0 \ | |
| libsm6 \ | |
| libxext6 \ | |
| libxrender1 \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Workdir | |
| WORKDIR /app | |
| # Copy requirements and install | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy app code | |
| COPY app.py . | |
| COPY classification_model_compressed.tflite . | |
| COPY detection_model_compressed.tflite . | |
| COPY static ./static | |
| # Expose port (Hugging Face expects 7860 by default, but it's okay as long as we match README) | |
| EXPOSE 7860 | |
| # Start FastAPI with uvicorn | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] | |