Spaces:
Sleeping
Sleeping
| FROM python:3.9 | |
| # Set working directory | |
| WORKDIR /code | |
| ENV PYTHONPATH=/code | |
| # Copy requirements and install dependencies | |
| COPY ./requirements.txt /code/requirements.txt | |
| RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt | |
| # Create necessary directories | |
| RUN mkdir -p /code/static/uploads && chmod 777 /code/static/uploads | |
| # Copy application files | |
| COPY . . | |
| # Expose port (Hugging Face Spaces uses 7860 by default) | |
| EXPOSE 7860 | |
| # Run the application | |
| # Using flask run host=0.0.0.0 port=7860 | |
| CMD ["python", "app.py"] | |