Spaces:
Running
Running
| FROM python:3.11-slim | |
| # Set the working directory to the root | |
| WORKDIR / | |
| # Copy application files to the root | |
| COPY . / | |
| # Install dependencies | |
| RUN pip install --no-cache-dir flask transformers | |
| # Set Hugging Face cache directory | |
| ENV HF_HOME="/tmp/huggingface" | |
| # Create the cache directory and set permissions | |
| RUN mkdir -p /tmp/huggingface && chmod -R 777 /tmp/huggingface | |
| # Expose the port for the app | |
| EXPOSE 7860 | |
| # Command to run app.py directly | |
| CMD ["python", "app.py"] |