You don't need this anymore

This commit is contained in:
Dragon Fire
2024-05-06 14:03:41 -04:00
parent 8bd76fa5a6
commit aae29b48fe
3 changed files with 10 additions and 19 deletions
+1 -6
View File
@@ -2,8 +2,6 @@ const tfnode = require('@tensorflow/tfjs-node');
const nsfw = require('nsfwjs');
const faceDetection = require('@tensorflow-models/face-detection');
const faceModel = faceDetection.SupportedModels.MediaPipeFaceDetector;
const url = require('url');
const path = require('path');
module.exports = class Tensorflow {
constructor(client) {
@@ -14,10 +12,7 @@ module.exports = class Tensorflow {
}
async loadNSFWJS() {
const nsfwjs = await nsfw.load(
`${url.pathToFileURL(path.join(__dirname, '..', 'tf_models', 'nsfw', 'web_model')).href}/`,
{ type: 'graph' }
);
const nsfwjs = await nsfw.load();
this.nsfwjs = nsfwjs;
return this.nsfwjs;
}