# Use an official lightweight Python image FROM python:3.11-slim # Set the working directory inside the container WORKDIR /app # Copy the requirements file and install dependencies COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Copy the rest of your application code into the container COPY . . # Command to run your application using Gunicorn # Hugging Face Spaces expects the app to run on port 7860 CMD ["gunicorn", "--bind", "0.0.0.0:7860", "--timeout", "120", "app:app"]