Skip to content

Legion-God/FakeNewsDetection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FakeNewsDetection

Test workflow Deployment workflow GitHub

Fake News detection using Neural Networks.

Contents

  1. Environment Set Up
  2. Coding Workflow
  3. Project Structure
  4. How to run website locally
  5. Fake News References

Setting up development environment.

Use pycharm to speed up the environment setup

  1. Create a new project from VCS and paste this url https://github.com/Legion-God/FakeNewsDetection.git

  2. 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.

  3. You are done setting up the environment.

Coding Workflow

NOTE: Always push to a feature branch NEVER directly push to main branch.

  1. Create or select issue you want to work on, new issue can be easily created by going to issues tab in GitHub.

  2. 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

  3. 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. run git status to check your current branch.

  4. Before working on any issue pull changes from main remote 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 main this pulls code from main remote branch and merges into your new feature branch.

  5. Write some code about feature.

  6. git status to 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."

  7. git push origin <branch_name> WARNING: don't write main in 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.

  8. 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.

Project Structure

  1. app dir contain files related to flask app, where templates dir contain html templates, change base.html for implementing a global style. index.html and results.html contain page specific html.

  2. If you want to add images/css/js files create a static dir inside app dir and create imgs, css, js dirs inside static dir which will contain subsequent files.

  3. pass_agg is package that will contain model related code.

  4. Write unit tests in tests, we are using pytest.

Running Website

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.

Running a Flask app

$ flask run

Fake News References

  1. Using scikit-learn

  2. Alter Using scikit-learn

  3. Scikit Learn Passive-Aggressive Classifier Help Page

  4. Passive-Aggressive Classifier Implementation in Scikit Learn

  5. Research Paper Implementing the Classifier

About

Fake News detection using Deep learning

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published