# Use a lightweight Python image FROM python:3.9-slim # Set the working directory WORKDIR /app # Copy only the requirements file first (to optimize build cache) COPY requirements.txt ./ # Install dependencies RUN pip install --no-cache-dir -r requirements.txt # Copy the rest of the application files COPY . . # Expose the correct port for Hugging Face Spaces EXPOSE 7860 # Run Streamlit app on the correct port CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]