Skip to content
/ nsfw Public

基于 NSFWJS 部署的内容审核服务

Notifications You must be signed in to change notification settings

0-RTT/nsfw

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

本项目使用了 nsfwjs 提供的模型进行内容审核。

一键安装

bash -c "$(curl -L https://raw.githubusercontent.com/0-RTT/index/main/nsfw.sh)" @ install

一键卸载

bash -c "$(curl -L https://raw.githubusercontent.com/0-RTT/index/main/nsfw.sh)" @ remove

配置nginx反代

    
    location / {
        proxy_pass http://127.0.0.1:9740;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }

用户可以通过以下格式的请求获取结果GET https://example.com/nsfw?url=https://telegra.ph/file/e6ae6329a5ee2f64acd06.jpg

API 将返回一个 JSON 对象,具体请参考nsfw_model

{
  "Neutral": 0.8800620436668396,
  "Porn": 0.08365660905838013,
  "Hentai": 0.018338331952691078,
  "Drawing": 0.012442261911928654,
  "Sexy": 0.005500736180692911
}

About

基于 NSFWJS 部署的内容审核服务

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published