| FROM python:3.10-slim | |
| # Set working directory | |
| WORKDIR /app | |
| # Copy requirements and install dependencies | |
| COPY requirements.txt . | |
| RUN pip install --upgrade pip && pip install --no-cache-dir -r requirements.txt | |
| # Copy the application code | |
| COPY . . | |
| # Expose port 7860 (required for Hugging Face Spaces) | |
| EXPOSE 7860 | |
| # Run the application with Uvicorn on port 7860 | |
| CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"] | |