This commit is contained in:
Dragon Fire
2021-03-22 18:13:06 -04:00
parent a8657441d5
commit c7f43ec74d
+1 -1
View File
@@ -226,7 +226,7 @@ module.exports = class Util {
height: dimensions.height
};
const img = await tf.node.decodeImage(data, 3);
const predictions = await model.classify(image, 1);
const predictions = await model.classify(img, 1);
img.dispose();
return bool ? predictions[0] !== 'Neutral' && predictions[0] !== 'Drawing' : predictions[0];
}