Instructions to use thegoatcc/classpulse-edge with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- ultralytics
How to use thegoatcc/classpulse-edge with ultralytics:
from huggingface_hub import hf_hub_download from ultralytics import YOLO # pick the weights file from this repo's "Files and versions" tab weights = hf_hub_download("thegoatcc/classpulse-edge", "<weights>.pt") model = YOLO(weights) source = 'http://images.cocodataset.org/val2017/000000039769.jpg' model.predict(source=source, save=True) - Notebooks
- Google Colab
- Kaggle
Download Dockerfile from thegoatcc/classpulse-edge: direct link, hf CLI and curl.
- Browser
- Download file 1.32 kB
-
https://huggingface.co/thegoatcc/classpulse-edge/resolve/main/Dockerfile
- Command line
-
hf download hf://thegoatcc/classpulse-edge/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/thegoatcc/classpulse-edge/resolve/main/Dockerfile
1.32 kB
| FROM python:3.12-slim | |
| ENV PYTHONDONTWRITEBYTECODE=1 \ | |
| PYTHONUNBUFFERED=1 \ | |
| DEBIAN_FRONTEND=noninteractive \ | |
| PORT=7860 | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| libgl1 \ | |
| libglib2.0-0 \ | |
| libsm6 \ | |
| libxext6 \ | |
| libxrender1 \ | |
| ffmpeg \ | |
| git \ | |
| && rm -rf /var/lib/apt/lists/* | |
| RUN useradd -m -u 1000 user | |
| WORKDIR /app | |
| COPY requirements.txt* ./ | |
| RUN pip install --no-cache-dir --upgrade pip && \ | |
| if [ -f requirements.txt ]; then pip install --no-cache-dir -r requirements.txt; fi && \ | |
| pip install --no-cache-dir PyYAML numpy opencv-python onnxruntime mediapipe ultralytics fastapi uvicorn jinja2 python-multipart imageio-ffmpeg | |
| COPY --chown=user:user . /app | |
| RUN mkdir -p /app/data /app/data/enrollment /app/data/unknown_faces /app/clips && \ | |
| chown -R user:user /app | |
| USER user | |
| ENV HOME=/home/user \ | |
| PATH="/home/user/.local/bin:${PATH}" | |
| EXPOSE 7860 | |
| CMD ["python", "-c", "import os, yaml, uvicorn; cfg=yaml.safe_load(open('config.yaml', encoding='utf-8')) or {}; cfg.setdefault('system',{})['backend']='mock'; yaml.safe_dump(cfg, open('config.yaml','w',encoding='utf-8'), sort_keys=False); _run=uvicorn.run; uvicorn.run=lambda app, **kw: _run(app, **{**kw, 'host':'0.0.0.0', 'port':int(os.environ.get('PORT', 7860))}); import main; main.main()"] |