Skip to content

Se7enB2st/AI-Detector

Repository files navigation

AI Detector

A simple tool to detect whether a given text is AI-generated or human-written. This MVP uses a pre-trained model from Hugging Face's transformers library to classify text.


Features

  • AI Detection: Detects if a given text is likely generated by an AI model (e.g., GPT).
  • Confidence Score: Provides a confidence score for the prediction.
  • Easy to Use: Simple Python function for quick integration.
  • User Interface Enhancements:
    • Improved layout with a menu bar for easy navigation
    • Progress bar for batch processing
    • Copy results to clipboard
    • Export results to CSV
    • Clear functionality to reset interface
  • Settings Dialog: Users can now configure security settings and UI preferences.
  • Logging: Comprehensive logging of security events and analysis results.
  • Batch Processing: Analyze multiple text files in a selected directory.

Security Features

  • Input validation and sanitization.
  • Rate limiting and file type restrictions.
  • Comprehensive logging of security events and analysis results.
  • Configurable limits for text length and file size.

Installation

Prerequisites

  • Python 3.7 or higher
  • pip (Python package manager)

Steps

  1. Clone this repository:
    git clone https://github.com/se7enb2st/AI-Detector.git
    cd anti-ai-detection
  2. Install the required Python libraries:
    pip install transformers torch
    

How It Works

  • The tool uses the roberta-base-openai-detector model from Hugging Face, which is fine-tuned to detect text generated by OpenAI models like GPT. The model analyzes the input text and returns:
  • Label: AI or Human
  • Confidence Score: A value between 0 and 1 indicating the model's confidence in the prediction.

User Interface Features

  1. Text Input Tab:

    • Enter text directly in the text area
    • Analyze text with a single click
    • Clear input and results
    • View results with confidence score
  2. File Input Tab:

    • Select and analyze individual text files
    • Clear file selection and results
    • View detailed analysis results
  3. Batch Processing Tab:

    • Process multiple text files in a directory
    • Progress bar shows analysis status
    • Copy results to clipboard
    • Export results to CSV format
    • Clear all results and reset interface

Example Output:

Prediction: AI (Confidence: 0.92)
Prediction: Human (Confidence: 0.85)

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages