--- language: - en pipeline_tag: text-classification tags: - ai-detection - roberta - generated-text-detection license: mit datasets: - artem9k/ai-text-detection-pile base_model: - FacebookAI/roberta-base widget: - text: "Machine learning is a subset of artificial intelligence." example_title: "AI Example" - text: "I went to the park to walk my dog yesterday." example_title: "Human Example" --- # 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}")