mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-20 14:00:22 +02:00
Fix
This commit is contained in:
+1
-1
@@ -217,7 +217,7 @@ module.exports = class Util {
|
|||||||
return str;
|
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 img = await tf.node.decodeImage(new Uint8Array(image), 3);
|
||||||
const predictions = model.classify(image, 1);
|
const predictions = model.classify(image, 1);
|
||||||
img.dispose();
|
img.dispose();
|
||||||
|
|||||||
Reference in New Issue
Block a user