Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Redacted_Agent_Banner

About

A small standalone API Endpoint that checks text for toxicity. It loads a Hugging Face Transformers.js model (Xenova/toxic-bert) and exposes a single endpoint where you send text and get back a toxicity score from 0 – 100.

Built to be used by the Redacted Discord Bot.

Run Dependencies

docker
docker-compose
docker-buildx

Installation Steps

  1. Clone the repository:
git clone --depth 1 https://github.com/Justus0405/Redacted-Agent.git
  1. Navigate to the directory:
cd Redacted-Agent
  1. Create a .env file from .env.example:
nano .env
  1. Build and run with docker:
docker-compose up -d --build

Testing

  1. To test the endpoint do:
curl -X POST http://localhost:3000/classify \
  -H "Content-Type: application/json" \
  -d '{"text":"I love trains!"}'

Copyright © 2026-present Justus0405