Update jspp.js
This commit is contained in:
parent
ed677bd031
commit
4a3a9917dd
1 changed files with 3 additions and 2 deletions
5
jspp.js
5
jspp.js
|
@ -2,6 +2,9 @@
|
||||||
// Created by Samuel Lord (NodeMixaholic/Sparksammy)
|
// Created by Samuel Lord (NodeMixaholic/Sparksammy)
|
||||||
// Now Maintained by Sneed Group
|
// Now Maintained by Sneed Group
|
||||||
// Licensed under Samuel Public License with <3
|
// Licensed under Samuel Public License with <3
|
||||||
|
|
||||||
|
const pp = new JSPlusPlus
|
||||||
|
const htmlFront = new JSPlusPlus.HTMLFrontend
|
||||||
class JSPlusPlus {
|
class JSPlusPlus {
|
||||||
static General = class {
|
static General = class {
|
||||||
|
|
||||||
|
@ -11,7 +14,6 @@ class JSPlusPlus {
|
||||||
}
|
}
|
||||||
|
|
||||||
isToxic(sentences) {
|
isToxic(sentences) {
|
||||||
let pp = new JSPlusPlus
|
|
||||||
// Load the model. Users optionally pass in a threshold and an array of
|
// Load the model. Users optionally pass in a threshold and an array of
|
||||||
// labels to include.
|
// labels to include.
|
||||||
pp.require("https://cdn.jsdelivr.net/npm/@tensorflow/tfjs")
|
pp.require("https://cdn.jsdelivr.net/npm/@tensorflow/tfjs")
|
||||||
|
@ -348,7 +350,6 @@ class JSPlusPlus {
|
||||||
|
|
||||||
}
|
}
|
||||||
static HTMLFrontend = class {
|
static HTMLFrontend = class {
|
||||||
htmlFront = new JSPlusPlus.HTMLFrontend
|
|
||||||
// Get element by ID
|
// Get element by ID
|
||||||
getElementById(elementID) {
|
getElementById(elementID) {
|
||||||
return document.getElementById(elementID)
|
return document.getElementById(elementID)
|
||||||
|
|
Loading…
Reference in a new issue