YAML Metadata Warning: empty or missing yaml metadata in repo card (https://huggingface.co/docs/hub/model-cards#model-card-metadata)

OpenedAI Moderations

An OpenAI API compatible moderations server for checking whether text is potentially harmful.

This server is built using moderation by embeddings by ifmain (Mike Afton) and FastAPI.

This is not affiliated with OpenAI in any way, and no OpenAI API key is required.

Quickstart

Docker (recommended):

docker compose up

or:

apt install git git-lfs
git clone https://huggingface.co/ifmain/moderation_by_embeddings repos/moderation_by_embeddings
pip install -r requirements.txt
python moderations.py --host 127.0.0.1 --port 5002

You can use the OpenAI client to interact with the API.

from openai import OpenAI
client = OpenAI(base_url="http://127.0.0.1:5002/v1", api_key='skip')
moderation = client.moderations.create(input="I want to kill them.")
print(moderation.results[0])

Links & Documentation

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference API
Unable to determine this model's library. Check the docs .