Fake News detection using Neural Networks.
- Environment Set Up
- Coding Workflow
- Project Structure
- How to run website locally
- Fake News References
-
Create a new project from VCS and paste this url
https://github.com/Legion-God/FakeNewsDetection.git -
If prompted for setting up virtualenv, agree and wait for the setup to complete. After completion open the terminal in the pycharm often found in bottom panel named as Terminal and if (venv) appears then everything is set up correctly.
-
You are done setting up the environment.
NOTE: Always push to a feature branch NEVER directly push to main branch.
-
Create or select issue you want to work on, new issue can be easily created by going to issues tab in GitHub.
-
Create a new feature branch on your local machine of format <short_issue_name><issue_number>, ex: if someone wants to work on feature frontend which is issue number 9, then branch name would be
frontend9 -
To create a new feature branch on your local machine, run
git checkout -b <branch_name>-b flag creates a new branch and checkout command switches to that branch. rungit statusto check your current branch. -
Before working on any issue pull changes from
mainremote branch into the current feature branch, if you are working on issue for long time, commit any changes before pulling from remote branch.git pull origin mainthis pulls code frommainremote branch and merges into your new feature branch. -
Write some code about feature.
-
git statusto check which files are changed,git add .to stage the changed files for committing.git commit -m "a very helpful commit message describing solution for the issue/feature." -
git push origin <branch_name>WARNING: don't writemainin branch_name, write the name of feature branch you worked on your local machine. You must be on branch from where you want to push code aka source branch and <branch_name> is destination branch. -
Open GitHub, and you will see an option to create a Pull Request(PR), create a PR and then leave for review. Someone else will do a code-review and merge it to
main. If tests failed when creating a PR request close it and make new PR with changes.
-
appdir contain files related to flask app, wheretemplatesdir contain html templates, changebase.htmlfor implementing a global style.index.htmlandresults.htmlcontain page specific html. -
If you want to add images/css/js files create a
staticdir insideappdir and createimgs,css,jsdirs insidestaticdir which will contain subsequent files. -
pass_aggis package that will contain model related code. -
Write unit tests in
tests, we are using pytest.
The CI/CD pipeline is set up which will run the tests and deploy the website if tests pass automatically. The tests for flask app are basic tests, improve them as you go.
$ flask run-
Using scikit-learn
-
Alter Using scikit-learn
-
Scikit Learn Passive-Aggressive Classifier Help Page
-
Passive-Aggressive Classifier Implementation in Scikit Learn
-
Research Paper Implementing the Classifier