This is a Python client for the OpenAI Text Classifier. Here is a live demo.
Here's an example of how to use it:
- You can get an OpenAI API key here.
- Set the environment variable
OPENAI_API_KEY
to your OpenAI API key. - Run the following code:
api_key = os.getenv('OPENAI_API_KEY')
classifier = OpenAiTextClassifier(api_key)
score, category = classifier.detect(YOUR_TEXT)