Spaces:
Runtime error
Runtime error
Commit History
-
Add pre-commit black formatter and apply initial formatting
Adds .pre-commit-config.yaml pinned to black 24.10.0 and [tool.black] config (line-length=88, target-version=py310) in pyproject.toml. Adds pre-commit to dev dependencies. Runs black --all-files to bring the existing codebase into conformance. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>db79f31
-
Extract helpers from app.py into image_utils and validators modules
Pure image/face helpers (_b64_to_pil, _pil_to_cv2, _cv2_to_pil, _crop_face_thumb, _pil_thumb_to_b64, _sort_faces_left_to_right, _face_to_dict, _collect_source_pils) move to image_utils.py (deps: Pillow, cv2, numpy only). Input validators move to validators.py (dep: gradio only). spawn_log moves to logging_utils.py. test_image_utils.py and test_validators.py import their modules directly and need no ML mocks. test_app.py shrinks to the two Gradio entry-point tests that genuinely require the mocked ML stack. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>819c9a2 -
Add inference logging to HuggingFace dataset
Logs each swap (target, sources, result, indices, duration, success/error) as a Parquet row to a private HF dataset via a daemon thread so it never blocks the response. Prunes files older than LOG_MAX_DAYS and squashes repo history once per day. Skips silently when HF_TOKEN / LOG_DATASET_REPO are unset. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>c4cb115
-
Remove inference logging and pyarrow dependency
Images are no longer stored — all processing is transient in memory, which avoids the GDPR concerns around persisting biometric data without user consent. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>381b753 -
Initial implementation of Selectable Face Swap space
- Detect up to 8 faces automatically on target image upload (CPU) - Click face thumbnails to select which faces to swap - Dynamic source image upload boxes per selected face - Face swap via InsightFace inswapper_128 + GFPGAN enhancement (ZeroGPU) - Logging to private HF dataset via logging_utils (Parquet, async) - GDPR-compliant privacy notice for biometric data Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>c84d21d