mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 15:07:42 +02:00
Fix
This commit is contained in:
+1
-1
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user