FROM python:3.9-slim # Set the working directory WORKDIR /app # Copy your dependency file and install COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Copy the rest of your files (the app.py) COPY . . # Hugging Face Spaces route traffic to port 7860 EXPOSE 7860 # Start the FastAPI server CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]