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.
- 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.
- 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.
- Python 3.7 or higher
- pip (Python package manager)
- Clone this repository:
git clone https://github.com/se7enb2st/AI-Detector.git cd anti-ai-detection - Install the required Python libraries:
pip install transformers torch
- 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.
-
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
-
File Input Tab:
- Select and analyze individual text files
- Clear file selection and results
- View detailed analysis results
-
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
Prediction: AI (Confidence: 0.92)
Prediction: Human (Confidence: 0.85)