# Use an official Python runtime as base image FROM python:3.10-slim # Set the working directory WORKDIR /app # Copy the requirements file and install dependencies COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Copy the app files COPY . . # Expose the port Flask runs on EXPOSE 7860 # Set environment variable for Hugging Face API Key (to be set in Spaces) ENV HUGGINGFACEHUB_API_TOKEN="" # Run the application CMD ["python", "app.py"]