Views
No views yet
1from transformers import pipeline
2
3# Load the model
4classifier = pipeline("text-classification", model="SaherMuhamed/bert-ai-detector-coling-finetuned")
5
6# Example text
7text = "Your text to classify here"
8
9# Get prediction
10result = classifier(text)
11
12# Print result
13print(f"Label: {result[0]['label']}")
14print(f"Confidence: {result[0]['score']:.2%}")Label: AI_GENERATED
Confidence: 92.45%