Spaces:
Runtime error
Runtime error
Download app/database/models.py from charlihellss/ComfyUI-Reactor-Fast-Face-Swap-CPU: direct link, hf CLI and curl.
- Browser
- Download file 315 Bytes
-
https://huggingface.co/spaces/charlihellss/ComfyUI-Reactor-Fast-Face-Swap-CPU/resolve/main/app/database/models.py
- Command line
-
hf download hf://spaces/charlihellss/ComfyUI-Reactor-Fast-Face-Swap-CPU/app/database/models.py
-
curl -L -o models.py https://huggingface.co/spaces/charlihellss/ComfyUI-Reactor-Fast-Face-Swap-CPU/resolve/main/app/database/models.py
315 Bytes
| from sqlalchemy.orm import declarative_base | |
| Base = declarative_base() | |
| def to_dict(obj): | |
| fields = obj.__table__.columns.keys() | |
| return { | |
| field: (val.to_dict() if hasattr(val, "to_dict") else val) | |
| for field in fields | |
| if (val := getattr(obj, field)) | |
| } | |
| # TODO: Define models here | |