mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-26 06:42:50 +02:00
Fix
This commit is contained in:
+1
-1
@@ -226,7 +226,7 @@ module.exports = class Util {
|
|||||||
height: dimensions.height
|
height: dimensions.height
|
||||||
};
|
};
|
||||||
const img = await tf.node.decodeImage(data, 3);
|
const img = await tf.node.decodeImage(data, 3);
|
||||||
const predictions = await model.classify(image, 1);
|
const predictions = await model.classify(img, 1);
|
||||||
img.dispose();
|
img.dispose();
|
||||||
return bool ? predictions[0] !== 'Neutral' && predictions[0] !== 'Drawing' : predictions[0];
|
return bool ? predictions[0] !== 'Neutral' && predictions[0] !== 'Drawing' : predictions[0];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user