Spaces:
Sleeping
Sleeping
| FROM python:3.11-slim | |
| WORKDIR /app | |
| # Install Python dependencies | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Pre-download AnimeGANv2 models | |
| RUN python -c "from huggingface_hub import hf_hub_download; \ | |
| hf_hub_download(repo_id='vumichien/AnimeGANv2_Hayao', filename='AnimeGANv2_Hayao.onnx', local_dir='models', local_dir_use_symlinks=False); \ | |
| hf_hub_download(repo_id='vumichien/AnimeGANv2_Shinkai', filename='AnimeGANv2_Shinkai.onnx', local_dir='models', local_dir_use_symlinks=False)" \ | |
| && rm -rf /root/.cache/huggingface/hub | |
| # Copy application code | |
| COPY app.py . | |
| COPY static/ static/ | |
| # Expose port | |
| ENV PORT=7860 | |
| EXPOSE 7860 | |
| # Start | |
| CMD ["python", "app.py"] | |