CoolFace
Modelpublic

ShivamVN/My-Ai-Text-Detector

sourceHugging Facemitupdated 10mo agoView on Hugging Face
0likes21downloads
Model Card

My AI Text Detector (RoBERTa Base)

This model is a fine-tuned version of roberta-base trained to distinguish between human-written text and AI-generated text.

Model Details

  • —Developer: ShivamVN
  • —Base Model: RoBERTa-base
  • —License: MIT
  • —Finetuned on: 80,000 samples from the artem9k/ai-text-detection-pile dataset.

How to Use

You can use this model directly with the Hugging Face transformers library:

python
from transformers import AutoModelForSequenceClassification, AutoTokenizer
import torch

model_name = "ShivamVN/My-Ai-Text-Detector"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSequenceClassification.from_pretrained(model_name)

text = "Artificial Intelligence is changing the world."
inputs = tokenizer(text, return_tensors="pt")

with torch.no_grad():
    logits = model(**inputs).logits

probabilities = torch.softmax(logits, dim=1)
print(f"AI Probability: {probabilities[0][1].item():.2f}")