adult.js
v1.0.2
Published
We do a adult detection here.
Downloads
4
Readme
adult.js
Hey, kids! You are not allowed in here!
Intro
This is a react.js component to help you detect if your user was an adult, if it is, we let them use our service, if it's not, we say no to them.
Installation
npm i adult.js
or
yarn add adult.js
Usage
import { ChildGuard } from 'adult.js'
function App() {
return (
<div>
<ChildGuard
weights_path="/weights"
show={true}
callback_function={(adult, age) => {
if (adult) {
console.log(`You are adult, your age is ${age}`)
} else {
console.log(`You are not adult, your age is ${age}`)
}
}}
/>
<div className="App">
Welcome!
</div>
</div>
);
}
The /weights
is actully in public/weights
, you have to download those ML weights from here, and copy those files to your local public/weights
folder.
Check the Example for more information.