Skip to content

mingchen3398/nsfwjs-api-appraisal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

说明

1.因为@tensorflow/tfjs-node安装对于服务器而言过于复杂(需要安装Visual Studio),所以就安装了@tensorflow/tfjs
2.目前图片推荐上传image/png image/jpeg类型文件
3.sharpnode版本要求 ^18.17.0 or >=20.3.0.

安装依赖

npm install / yarn 

安装 nodemon

npm install nodemon -g

nodemon是一种工具,可以自动检测到目录中的文件更改时通过重新启动应用程序来调试基于node.js的应用程序。----引用自简书

运行

npm run start / npm run monstart

日志:

[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
模块已运行

模块已运行之后功能才能正常使用