Coder Social home page Coder Social logo

fake_news_detection's Introduction

Checkout the app on this link

Introduction

Do you trust all the news you hear from social media? All news are not real, right? So how will you detect the fake news? We will be using Multinomial Naive Bayes method to classify the news article scrapped from the news article link, as fake or real.

Data

The dataset we’ll use for this python project- we’ll call it news.csv. This dataset has a shape of 7796×4. The first column identifies the news, the second and third are the title and text, and the fourth column has labels denoting whether the news is REAL or FAKE. The dataset can be downloaded from here

Project Structre

This project has four major parts :

  • fake_news_detection.py - This contains code fot our Machine Learning model to classify the model
  • app.py - This contains Flask APIs that receives news url through GUI or API calls, extracts the article from the url, feeds it to the model and returns the prediction.
  • templates - This folder contains the HTML template to allow user to enter url and displays whether the news is fake or real.
  • static - This folder contains the CSS file.
  • requirements.txt - It contains the list of libraries required to run the heroku app

Running the project on local machine

Ensure that you are in the project home directory. Create the machine learning model by running below command - python fake_news_detection.py This would create a serialized version of our model into a file model.pkl

Run app.py using below command to start Flask API python app.py By default, flask will run on port 5000.

Navigate to URL http://127.0.0.1:5000

fake_news_detection's People

Contributors

wanabprgmr avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.