This project aims to detect plagiarism between two given texts using a pre-trained machine learning model.
Make sure you have the following installed on your machine:
- Python (>=3.11.6)
- Node.js (>=20.10.0)
- Pip (Python package installer >=23.3.2)
- Git
-
Clone the repository:
git clone https://github.com/abdelhak002/plagiarism-detector-cnn.git
-
Change into the project directory:
cd plagiarism-detection-cnn
-
Create a virtual environment (optional but recommended):
python -m venv .venv
-
Activate the virtual environment:
- On Windows:
.\.venv\Scripts\activate
- On macOS/Linux:
source .venv/bin/activate
-
Install project dependencies:
pip install -r requirements.txt
npm install
-
Training the model:
python model/build_model.py
-
Testing the model:
python test_model.py
we load the pre-trained model and tokenizer from the model
directory and use them in the flask web app.
to run the flask web app:
flask --app app run
/or
python -m flask --app app run
debug mode:
flask --app app run --debug
/or
python -m flask --app app run --debug