Skip to content

Update docs and code for v2 5-class NSFW models#18

Merged
fcakyon merged 5 commits intomainfrom
update-docs-v2-models
Mar 2, 2026
Merged

Update docs and code for v2 5-class NSFW models#18
fcakyon merged 5 commits intomainfrom
update-docs-v2-models

Conversation

@fcakyon
Copy link
Contributor

@fcakyon fcakyon commented Mar 2, 2026

All doc references now point to the v2 5-class models (nsfw-detection-2-mini/nano) — the old nsfw-detector-mini link was 404. Performance table updated with per-class F1 scores and output examples use lowercase labels matching actual model output (safe, porn, hentai, drawing, sexy).

  • Fix transformers.pipeline() compat for both v4 (framework param) and v5 (removed) via inspect.signature detection
  • Add mock tests for v4/v5 pipeline signatures to catch regressions
  • Parse HF URLs from all markdown files and validate with HEAD requests so broken doc links are caught by CI
moderators viddexa/nsfw-detection-2-mini /path/to/image.jpg

fcakyon added 3 commits March 3, 2026 01:29
nsfw-detector-mini links were 404. All docs now point to the
v2 models (nsfw-detection-2-mini/nano) with 5-class output
(safe, porn, hentai, drawing, sexy) and updated performance table.
transformers 5.x removed the `framework` parameter from
`pipeline()`. Use `inspect.signature` to detect the API
at runtime and only pass `framework` when the param exists.
- Mock tests for v4 (explicit `framework` param) and v5
  (rejects `framework`) pipeline signatures
- Parse HF URLs from all markdown files and validate via
  HEAD requests so broken doc links are caught by CI
- Switch integration test from Falconsai to viddexa model
@fcakyon fcakyon self-assigned this Mar 2, 2026
@github-actions
Copy link

github-actions bot commented Mar 2, 2026

❌ Docformatter Issues

The following docstring formatting issues were found:

src/moderators/integrations/transformers_moderator.py

🔧 How to fix:

Auto-format docstrings:

uv run docformatter --in-place --recursive src/ tests/

This will automatically format all docstrings to follow PEP 257 conventions.

@fcakyon fcakyon merged commit e19352e into main Mar 2, 2026
5 checks passed
@fcakyon fcakyon deleted the update-docs-v2-models branch March 2, 2026 22:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant