Spaces:
Sleeping
Sleeping
| FROM python:3.11-slim | |
| # Set the working directory to /app | |
| WORKDIR /app | |
| # Copy the requirements and install them | |
| COPY api_requirements.txt . | |
| RUN pip install --no-cache-dir -r api_requirements.txt | |
| # Copy the API app file | |
| COPY api_app.py . | |
| # Expose port 7860 which Hugging Face Spaces requires | |
| EXPOSE 7860 | |
| # Start the FastAPI server using Uvicorn | |
| CMD ["uvicorn", "api_app:app", "--host", "0.0.0.0", "--port", "7860"] | |