Spaces:
Running
Running
| # 1. Use an official Python image | |
| FROM python:3.9-slim | |
| # 2. Set the working directory inside the container | |
| WORKDIR /app | |
| # 3. Copy only the requirements first (better for speed) | |
| COPY requirements.txt . | |
| # 4. Install the libraries | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # 5. Copy the rest of your code (app.py and templates folder) | |
| COPY . . | |
| # 6. Tell Hugging Face to use port 7860 | |
| ENV PORT=7860 | |
| EXPOSE 7860 | |
| # 7. Start the Flask app | |
| CMD ["python", "app.py"] |