Skip to content
/ nsfw Public
forked from 0-RTT/nsfw

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

Notifications You must be signed in to change notification settings

248780577/nsfw

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

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

一键安装

bash -c "$(curl -L https://jiasu.in/nsfw.sh)" @ install

一键卸载

bash -c "$(curl -L https://jiasu.in/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=图片链接

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

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

示例: GET https://api.jiasu.in/nsfw?url=https://telegra.ph/file/e6ae6329a5ee2f64acd06.jpg

{
  "Porn": 0.63987535238266,
  "Sexy": 0.351394861936569,
  "Hentai": 0.00593265052884817,
  "Neutral": 0.00271736341528595,
  "Drawing": 0.000079724035458639
}

About

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%