Instructions to use haresh2792005/MFAF-Net with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MediaPipe
How to use haresh2792005/MFAF-Net with MediaPipe:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
Download Dockerfile from haresh2792005/MFAF-Net: direct link, hf CLI and curl.
- Browser
- Download file 1.27 kB
-
https://huggingface.co/haresh2792005/MFAF-Net/resolve/main/Dockerfile
- Command line
-
hf download hf://haresh2792005/MFAF-Net/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/haresh2792005/MFAF-Net/resolve/main/Dockerfile
1.27 kB
| FROM python:3.10-slim | |
| # System dependencies required by OpenCV & MediaPipe | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| libgl1 \ | |
| libglib2.0-0 \ | |
| libsm6 \ | |
| libxext6 \ | |
| libxrender1 \ | |
| libgomp1 \ | |
| curl \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Hugging Face Spaces requires non-root user UID 1000 | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| ENV HOME=/home/user \ | |
| PATH=/home/user/.local/bin:$PATH \ | |
| PYTHONUNBUFFERED=1 \ | |
| PORT=7860 | |
| WORKDIR $HOME/app | |
| # Install Python dependencies | |
| COPY --chown=user requirements.txt . | |
| RUN pip install --no-cache-dir --upgrade pip && \ | |
| pip install --no-cache-dir -r requirements.txt | |
| # Copy application code & trained checkpoint | |
| COPY --chown=user . . | |
| # Ensure writable runtime directories exist | |
| RUN mkdir -p static/results static/uploads data models | |
| # Pre-download MediaPipe FaceLandmarker model if not already present in models/ | |
| RUN if [ ! -f models/face_landmarker.task ]; then \ | |
| curl -L -o models/face_landmarker.task \ | |
| "https://storage.googleapis.com/mediapipe-models/face_landmarker/face_landmarker/float16/1/face_landmarker.task"; \ | |
| fi | |
| EXPOSE 7860 | |
| CMD ["gunicorn", "--bind", "0.0.0.0:7860", "--workers", "1", "--threads", "4", "--timeout", "120", "app:app"] | |