Coder Social home page Coder Social logo

naughty-node's Introduction

Naughty Node

Naughty Node is a severless implementation of Tesnsorflow.js's prebuilt toxicity model for single queries.

Usage

The usage of Naughty Node is quite straight forward, all requests should be sent as GETs with all variables provided as query parameters.

Query Parameters

The following query parameters are used in Naughty Node:

Use Cases

The uses cases for this are genuinely limited by your imagination.

At Kogneta, a few cases for Naughty Node include:

  • Evaluating page content and anchors to identify spammy links
  • Scanning UGC for content that may need to be removed
  • Analyzing customer reviews to identify offensive or explicit ones

... are you using Naught Node in a unique way? Let us know and we'll feature you :)

Deployment

Environment Variables

In order for Naughty Node to work, the following environment variable(s) need to be configured and used:

kgKey

In order to prevent any Joe/Jane Schmo from using your Cloud Function, Naughty Node uses an internal environment key that all requests are checked against. The variable name is called kgKey.

On the request side the kgKey is evaluated as a query parameter in all requests.

Function Configuration

Since Tensorflow.js is quite picky about the hardware and Node.Js versions it is deployed on, I've found that the following Google Cloud Function settings have worked best:

Item Configuration Value
Memory 8 GiB
Runtime Node.js 12
Timeout 120 seconds

naughty-node's People

Contributors

jordanchoo avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.