Training:
-
Extract dataset directory
(dataset/bbc-fulltext.zip)
. The directory should be namedbbc
. -
Run
compile.py
in the/dataset
directory from your terminal to compile the text files into single dataset file.$ cd dataset
$ python compile.py
-
Run
engine.py
.$ python engine.py
-
If there is no pickle files, the system will automatically train the dataset and generate pickle files. This could take some time depends on your hardware.
-
If you want to retrain your system simply delete the
pickles
directory.
Classification:
-
Run the
app.py
file.$ python app.py
-
Using Postman (or similar tools), send
POST
request tohttp://127.0.0.1:5050/classify
with these form data:post : your_article