# nsfwjs-api **Repository Path**: mingchen3398/nsfwjs-api-appraisal ## Basic Information - **Project Name**: nsfwjs-api - **Description**: 鉴定图片是否为NSFW内容 - **Primary Language**: JavaScript - **License**: Apache-2.0 - **Default Branch**: sharp - **Homepage**: https://nsfw.poshir.top/ - **GVP Project**: No ## Statistics - **Stars**: 2 - **Forks**: 3 - **Created**: 2022-03-28 - **Last Updated**: 2024-04-24 ## Categories & Tags **Categories**: Uncategorized **Tags**: nsfw, Express, nsfwjs, Nodejs ## README ## 说明 **1.因为`@tensorflow/tfjs-node`安装对于服务器而言过于复杂(需要安装Visual Studio),所以就安装了`@tensorflow/tfjs` 2.目前图片推荐上传`image/png` `image/jpeg`类型文件 3.`sharp`node版本要求 `^18.17.0 or >=20.3.0.`** ## 安装依赖 ```shell npm install / yarn ``` ## 安装 nodemon ```shell npm install nodemon -g ``` >nodemon是一种工具,可以自动检测到目录中的文件更改时通过重新启动应用程序来调试基于node.js的应用程序。----引用自简书 ## 运行 ```shell npm run start / npm run monstart ``` 日志: ```log [nodemon] restarting due to changes... [nodemon] starting `node app.js` ============================ Hi there 👋. Looks like you are running TensorFlow.js in Node.js. To speed things up dramatically, install our node backend, which binds to TensorFlow C++, by running npm i @tensorflow/tfjs-node, or npm i @tensorflow/tfjs-node-gpu if you have CUDA. Then call require('@tensorflow/tfjs-node'); (-gpu suffix for CUDA) at the start of your program. Visit https://github.com/tensorflow/tfjs-node for more details. ============================ 项目已运行在端口 3456 模块已运行 ``` 模块已运行之后功能才能正常使用