Update jspp.js
This commit is contained in:
parent
b4fc52365e
commit
81aabdfb07
1 changed files with 2 additions and 5 deletions
7
jspp.js
7
jspp.js
|
@ -19,12 +19,9 @@ class JSPlusPlus {
|
||||||
gen.require("https://cdn.jsdelivr.net/npm/@tensorflow-models/toxicity")
|
gen.require("https://cdn.jsdelivr.net/npm/@tensorflow-models/toxicity")
|
||||||
let threshold = 0.9;
|
let threshold = 0.9;
|
||||||
let t = await toxicity.load(threshold).then(model => {
|
let t = await toxicity.load(threshold).then(model => {
|
||||||
let m =model.classify(sentences).then(predictions => {
|
return model.classify(sentences).then(predictions => {
|
||||||
let p = await predictions
|
return predictions
|
||||||
console.log(p)
|
|
||||||
return p
|
|
||||||
});
|
});
|
||||||
return m
|
|
||||||
});
|
});
|
||||||
return t
|
return t
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue