Skip to content

Commit

Permalink
Merge branch 'firefox-main' of https://github.com/alganzory/haramblur
Browse files Browse the repository at this point in the history
…into firefox-main
  • Loading branch information
alganzory committed Mar 22, 2024
2 parents 84bc4ab + 4aab008 commit 3a1b7dc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/offscreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,11 @@ const runDetection = async (img, isVideo = false) => {
detector.human.tf.dispose(tensor);
return "nsfw";
}
if (!settings.shouldDetectGender()) return false; // no need to run gender detection if it's not enabled
if (!settings.shouldDetectGender())
{
detector.human.tf.dispose(tensor);
return false; // no need to run gender detection if it's not enabled
}
const predictions = await detector.humanModelClassify(tensor);
// console.log("offscreen human result", predictions);
detector.human.tf.dispose(tensor);
Expand Down

0 comments on commit 3a1b7dc

Please sign in to comment.