From 1d9124721d6c65ace13424e2592377151a958874 Mon Sep 17 00:00:00 2001 From: Sam Sneed <163201376+sam-sneed@users.noreply.github.com> Date: Fri, 31 May 2024 22:53:11 +0000 Subject: [PATCH] Update jspp.js --- jspp.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/jspp.js b/jspp.js index c5a1c33..a3a2f73 100644 --- a/jspp.js +++ b/jspp.js @@ -18,15 +18,13 @@ class JSPlusPlus { gen.require("https://cdn.jsdelivr.net/npm/@tensorflow/tfjs") gen.require("https://cdn.jsdelivr.net/npm/@tensorflow-models/toxicity") let threshold = 0.9; - let toxics = [] + var per = "" toxicity.load(threshold).then(model => { model.classify(sentences).then(predictions => { - predictions.forEach(classified => { - toxics = classified.results.match - }); + console.log(predictions) + per = predictions }); }); - return toxics; } async asyncSleep(ms) {