This project uses a hybrid classifier that combines linguistic features with RoBERTa embeddings to detect AI-generated text.
To run the prediction API, you must manually download the following files:
File/Folder Name | Description |
---|---|
hybrid_classifier_weights.pt |
PyTorch weights for the hybrid model |
feature_extractor.pkl |
Pre-trained linguistic feature extractor |
tokenizer/ |
HuggingFace tokenizer folder (roberta-base ) |
Place the files in the root directory of the project like this:
server/
βββ app.py
βββ hybrid_classifier_weights.pt
βββ feature_extractor.pkl
βββ tokenizer/
β βββ tokenizer_config.json
β βββ vocab.json
β βββ merges.txt
βββ model_classifier/
β οΈ These files are not included in the GitHub repository due to their size. Please obtain them from the Google Drive.
1. Install dependencies
pip install -r requirements.txt
2. Run the backend
cd server
python app.py
1. Install dependencies
npm install
2. Run the frontend
cd ai_writing_detector
npm run dev
- Paste a paragraph of text with at least 50 words into the text box
- Click "Check"
- The model will return:
Prediction: Human-written or AI-generated
Confidence Score: A visual confidence score of AI generated from 0β100%