Skip to content

Latest commit

 

History

History
42 lines (26 loc) · 691 Bytes

README.md

File metadata and controls

42 lines (26 loc) · 691 Bytes

TF-Toxicity-REST

A RESTful API for TensorFlow's Pre-Trained Toxicity Classifier

Description

This is a customizable Nest.js backend which runs TensorFlow's pre-trained toxicity classifier.

Installation

npm install

Usage

To run the server in development mode:

npm run start

# watch mode
npm run start:dev

API

POST /api/classifier

Content-Type: application/json

Request Content:

  • input (string | string[]): must contain a string or an array of strings.

Request Examples:

{
  "input": "You are such a <redacted>."
}