# Dockerfile # Use a standard Python 3.9 image FROM python:3.9-slim # Set the working directory inside the container WORKDIR /app # Copy the requirements file and install dependencies COPY requirements.txt requirements.txt RUN pip install --no-cache-dir -r requirements.txt # Copy your application code into the container COPY . . # Tell the container to listen on port 7860 (the standard for HF Spaces) EXPOSE 7860 # Command to run your Flask app using gunicorn web server # This is more robust than Flask's built-in server CMD [ "gunicorn" , "--bind" , "0.0.0.0:7860" , "--workers" , "1" , "--preload" , "app:app" ]