This commit is contained in:
Dragon Fire
2021-03-22 17:25:21 -04:00
parent d837eec501
commit 5a76ac764f
+1 -1
View File
@@ -217,7 +217,7 @@ module.exports = class Util {
return str;
}
static isImageNSFW(model, image, bool = true) {
static async isImageNSFW(model, image, bool = true) {
const img = await tf.node.decodeImage(new Uint8Array(image), 3);
const predictions = model.classify(image, 1);
img.dispose();