mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-24 22:34:46 +02:00
Fix
This commit is contained in:
+1
-1
@@ -219,7 +219,7 @@ module.exports = class Util {
|
|||||||
|
|
||||||
static async isImageNSFW(model, image, bool = true) {
|
static async isImageNSFW(model, image, bool = true) {
|
||||||
const img = await tf.node.decodeImage(image, 3);
|
const img = await tf.node.decodeImage(image, 3);
|
||||||
const predictions = await model.classify(img, 2);
|
const predictions = await model.classify(img);
|
||||||
img.dispose();
|
img.dispose();
|
||||||
if (bool) {
|
if (bool) {
|
||||||
const results = [];
|
const results = [];
|
||||||
|
|||||||
Reference in New Issue
Block a user