Instructions to use SuperAnnotate/ai-detector with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use SuperAnnotate/ai-detector with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="SuperAnnotate/ai-detector")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("SuperAnnotate/ai-detector", dtype="auto") - Notebooks
- Google Colab
- Kaggle
What does the final number mean?
In [4]: text_example = '''TRUMP: “Tariffs are about making America rich again an
...: d making America great again. And it’s happening. And it will happen rat
...: her quickly. There’ll be a little disturbance, but we’re OK with that. I
...: t won’t be much.”
...:
...: THE FACTS: Trump is banking on the idea that taxing imports is the road
...: to riches for the United States. Most economists say Trump’s tariffs wou
...: ld hurt the country, as they’re tax increases that could raise the costs
...: of goods in ways that could also harm economic growth. Trump suggests t
...: hat the impact on inflation would be minimal.'''
In [5]: res = detector.detect_report(text_example)
In [6]: print(res)
{'generated_score': 0.6790414452552795, 'author': 'Not sure'}
If I put this text from AP News in any online AI detector, I'll see that it's 0% AI generated. So what does it mean 'generated_score': 0.6790414452552795?
If 67% AI generated, so it's a wrong AI Detector... or it's a false detect.
Ok, I see now how it works.