This repository contains code for a machine learning model that detects the flair of the reddit post, given the url.
The repo is divided into the following structure:
- Notebooks - Containing all the .pynb files related to the project.
- Web App - containing all the files needed for running the web-app.
- Model - containing the pickle file of the best performing model.
Open terminal and perform the following steps.
- Clone the repository
git clone https://github.com/aneesh404/Flair-detector.git
- Install the required libraries
pip3 install -r requirements.txt
- Navigate to the folder containing flask code
- Export the following variables in your terminal
export FLASK_APP=app.py && export FLASK_ENV=development
- Run the app
- Go to the address as shown after running the command above.
Features : Titles+Comments+Body+Url
|
Model used |
Accuracy |
|
Random Forest Classifier |
68.983 |
|
naive_bayes |
57.657 |
|
linear_svm |
71.042 |
|
logistic regression |
70.656 |
|
Bag Of Words |
64.092 |
Features : Titles+Comments+Body
|
Model used |
Accuracy |
|
Random Forest Classifier |
69.240 |
|
Naive Bayes |
55.083 |
|
Linear svm |
67.567 |
|
Logistic Regression |
69.112 |
|
Bag Of Words |
65.122 |
|
Model used |
Accuracy |
|
Random Forest Classifier |
65.637 |
|
Naive Bayes |
60.875 |
|
Linear svm |
66.795 |
|
Logistic Regression |
66.410 |
|
Bag Of Words |
64.052 |
Features : Title+Comments
|
Model used |
Accuracy |
|
Random Forest Classifier |
60.231 |
|
Naive Bayes |
50.454 |
|
Linear svm |
63.191 |
|
Logistic Regression |
62.934 |
|
Bag Of Words |
61.122 |
|
Model used |
Accuracy |
|
Random Forest Classifier |
54.697 |
|
Naive Bayes |
53.796 |
|
Linear svm |
53.925 |
|
Logistic Regression |
54.569 |
|
Bag Of Words |
53.796 |