本项目是基于NSFWJS的图片鉴黄,使用了[NSFWJS]()提供的预训练模型。
本文由GitHub Copilot 生成
docker pull gindex/nsfwjs-api:latest
docker run -itd \
--name nsfwjs \
-p 3035:3035 \
--restart=always \
gindex/nsfwjs-api:latest
http://ip:3035/
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo bash -
sudo apt update -y
sudo apt-get install -y nodejs
sudo apt-get install git
git clone https://github.com/x-dr/nsfw-api.git
npm install
npm rebuild @tensorflow/tfjs-node --build-from-source
npm run start
npm install -g pm2
npm start pm2.json
npm stop nsfw-api #暂停
npm restart nsfw-api #重启
http://ip:3035/
The Serverless Function "index.js" is 111.7mb which exceeds the maximum size limit of 50mb.
{
"Neutral": 0.9852375388145447,
"Drawing": 0.007717587053775787,
"Porn": 0.0043180412612855434,
"Hentai": 0.002539177890866995,
"Sexy": 0.00018772167095448822,
"url": "url",
"status": 200,
"rating": 1
}