- Name: An Lu (Andy Lu)
- What programming language is being used: Python
$ python -m venv env
...(snip)
$ .\env\Scripts\activate
...(snip)
$ python3 -m venv env
...(snip)
$ source env/bin/activate
...(snip)
$ pip install -r requirements.txt
...(snip)
deactivate
$ python3 main.py -h
Usage: python main.py [SUBCOMMAND] [OPTIONS]
Subcommands and options:
-t, --train <file> train the model using the <file> (.csv)
-p, --predict <file> predict the class of the emails in the <file> (.txt)
-h, --help display this help message
Example:
$ python3 main.py -t ./data/spam.csv
Starting to train the model...
Model trained
Accuracy: 0.9835
Saving the model...
Model saved
Example:
$ python3 main.py -p ./data/email.txt
Email content:
Sounds great! Are you home now?
Result: This email is not Spam.
Probability: 0.9993