Skip to content

Conway/perspective

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

perspective

perspective is an API wrapper for Google's Perspective API

Installation

To install, use pip install perspective

Usage

A simple example:

from perspective import PerspectiveAPI
p = PerspectiveAPI("API_KEY")
result = p.score("This is a comment")
print("Toxicity score: ", result["TOXICITY"])

More complex