Views
No views yet
answerdotai/ModernBERT-base0 = human, 1 = aiintegrity_human_ai_surface_v2_no_train.jsonl (~35k rows)1from transformers import AutoTokenizer, AutoModelForSequenceClassification
2import torch
3
4repo = "videogameaetoros/Ai_detector"
5tok = AutoTokenizer.from_pretrained(repo)
6model = AutoModelForSequenceClassification.from_pretrained(repo)
7model.eval()
8
9text = "Your essay here..."
10enc = tok(text, return_tensors="pt", truncation=True, max_length=384)
11with torch.no_grad():
12 probs = torch.softmax(model(**enc).logits, dim=-1)[0]
13print({"human": float(probs[0]), "ai": float(probs[1])})INTEGRITY_MODEL_REPO=videogameaetoros/Ai_detector.