# Use the official slim Python image FROM python:3.9-slim # Set working directory WORKDIR /app # Copy and install dependencies COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Copy application code COPY . . # Expose port 7860 for Hugging Face Spaces EXPOSE 7860 # Launch the FastAPI app via Uvicorn CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]