NextFilter
Nsfwfilter with features like nsfw image detector, nsfw words detector, nsfw words cleaner
Installation
Installation
npm i next-filter@latest
Usage Filter
const { filter, clean, detect } = require("next-filter");
(async () => {
const imageUrl = ``;
try {
const resp = await filter(imageUrl);
if (resp.result) {
console.log("Image is nsfw");
} else {
console.log("Image isn't nsfw");
}
} catch (err) {
console.log(err);
}
})();
(async () => {
const prompt = ``;
try {
const resp = await clean(prompt);
console.log(resp.result);
} catch (err) {
console.log(err);
}
})();
(async () => {
const prompt = ``;
try {
const resp = await detect(prompt);
if (resp.result) {
console.log("Prompt contains nsfw words")
} else {
console.log("Prompt doesn't contain nsfw words")
}
} catch (err) {
console.log(err);
}
})();
General Notes For Image Filter
- Animated GIF Support
- Image Types: .jpg .png .bmp .gif .webp
- Max image size: 10 MB
General Notes For Cleaner
- Analyze text and return cleaned version of the text.
- Language Support: Arabic, Czech, Danish, German, English, Esperanto, Spanish, Castilian, Persian, Finnish, French, Hindi, Hungarian, Italian, Japanese, Korean, Dutch, Flemish, Norwegian, Polish, Portuguese, Russian, Swedish, Thai, Klingon, Turkish, Chinese.
Support