{"id":46892102,"url":"https://github.com/mihail911/fake-news","last_synced_at":"2026-03-10T22:45:56.996Z","repository":{"id":70293101,"uuid":"296527756","full_name":"mihail911/fake-news","owner":"mihail911","description":"Building a fake news detector from initial ideation to model deployment","archived":false,"fork":false,"pushed_at":"2026-02-15T14:28:50.000Z","size":2713,"stargazers_count":166,"open_issues_count":48,"forks_count":64,"subscribers_count":4,"default_branch":"master","last_synced_at":"2026-02-15T21:10:56.976Z","etag":null,"topics":["deeplearning","machinelearning","mlops","natural-language-processing","nlp","pytorch","scikit-learn"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mihail911.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-09-18T05:59:08.000Z","updated_at":"2026-01-22T13:56:37.000Z","dependencies_parsed_at":"2024-12-01T06:30:51.315Z","dependency_job_id":"48218b44-dae5-4ecc-ba19-bcec165709c3","html_url":"https://github.com/mihail911/fake-news","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mihail911/fake-news","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mihail911%2Ffake-news","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mihail911%2Ffake-news/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mihail911%2Ffake-news/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mihail911%2Ffake-news/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mihail911","download_url":"https://codeload.github.com/mihail911/fake-news/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mihail911%2Ffake-news/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30359926,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T21:41:54.280Z","status":"ssl_error","status_checked_at":"2026-03-10T21:40:59.357Z","response_time":106,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deeplearning","machinelearning","mlops","natural-language-processing","nlp","pytorch","scikit-learn"],"created_at":"2026-03-10T22:45:56.750Z","updated_at":"2026-03-10T22:45:56.982Z","avatar_url":"https://github.com/mihail911.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fake News Detector Powered By Machine Learning\n\nA complete example of building an end-to-end machine learning project from initial idea to deployment. \n\n![](assets/shorter_live_run.gif)\n\nThis repo accompanies the blog post series describing how to build a fake news detection application. The posts included here:\n\n- [Initial Setup and Tooling](https://www.mihaileric.com/posts/setting-up-a-machine-learning-project/): Describes project ideation, setting up your repository, and initial project tooling. \n\n- [Exploratory Data Analysis](https://www.mihaileric.com/posts/performing-exploratory-data-analysis/): Describes how to acquire a dataset and perform exploratory data analysis with tools like [Pandas](https://pandas.pydata.org/) in order to better understand the problem.\n\n- [Building a V1 Model Training/Testing Pipeline](https://www.mihaileric.com/posts/machine-learning-project-model-v1/): Describes how to get a functional training/evaluation pipeline for the first ML model (a random-forest classifier), including how to properly test various parts of your pipeline.\n\n- [Error Analysis and Model V2](https://www.mihaileric.com/posts/machine-learning-project-error-analysis-model-v2/): Describes how to interpret what your first model has learned through feature analysis (via techniques like [Shapley values](https://christophm.github.io/interpretable-ml-book/shapley.html)) and error analysis. Also works toward a second model powered by [Roberta](https://ai.facebook.com/blog/roberta-an-optimized-method-for-pretraining-self-supervised-nlp-systems/). \n\n- [Model Deployment and Continuous Integration](https://www.mihaileric.com/posts/machine-learning-project-model-deployment/): Describes how to deploy your model using [FastAPI](https://fastapi.tiangolo.com/) and [Docker](https://www.docker.com/) and build an accompanying Chrome extension. Also illustrates key components of a continuous integration system for collaborating on the application with other team members in a scalable and reproducible fashion.\n\n## Features\n\n* **Random forest classifier** powered by [Scikit-learn](https://scikit-learn.org/stable/).\n* **RoBERTa** model powered by [HuggingFace Transformers](https://huggingface.co/transformers/) and [PyTorch Lightning](https://github.com/PyTorchLightning/pytorch-lightning).\n* **Data versioning** and configurable train/test pipelines using [DVC](https://github.com/iterative/dvc).\n* **Exploratory data analysis** using [Pandas](https://pandas.pydata.org/).\n* **Experiment tracking** and **logging** via [MLFlow](https://mlflow.org/).\n* **Continuous integration** with [Github actions](https://github.com/features/actions).\n* **Functionality tests** powered by [PyTest](https://docs.pytest.org/en/stable/) and [Great Expectations](https://greatexpectations.io/).\n* **Error** and **model feature analysis** via [SHAP](https://github.com/slundberg/shap).\n* **Production-ready server** via [FastAPI](https://fastapi.tiangolo.com/) and [Gunicorn](https://gunicorn.org/).\n* **Chrome extension** for interacting with a model in the [browser](https://chrome.google.com/webstore/category/extensions?hl=en).\n\n## How to Use It\n\nGo to the root directory of the repo and run:\n```\npip install -r requirements.txt\n```\n\nDownload the data from [this link](https://github.com/Tariq60/LIAR-PLUS/tree/master/dataset/tsv) into `data/raw`.\n\nYou're ready to go!\n\n### Train\n\nTo train the [random forest baseline](https://www.mihaileric.com/posts/machine-learning-project-model-v1/), run the following from the root directory:\n```\ndvc repro train-random-forest\n```\n\nYour output should look something like the following:\n```\nINFO - 2021-01-21 21:26:49,779 - features.py - Creating featurizer from scratch...\nINFO - 2021-01-21 21:26:49,781 - tree_based.py - Initializing model from scratch...\nINFO - 2021-01-21 21:26:49,781 - train.py - Training model...\nINFO - 2021-01-21 21:26:50,163 - features.py - Saving featurizer to disk...\nINFO - 2021-01-21 21:26:50,169 - tree_based.py - Featurizing data from scratch...\nINFO - 2021-01-21 21:26:59,360 - tree_based.py - Saving model to disk...\nINFO - 2021-01-21 21:26:59,459 - train.py - Evaluating model...\nINFO - 2021-01-21 21:26:59,584 - train.py - Val metrics: {'val f1': 0.7587628865979381, 'val accuracy': 0.7266355140186916, 'val auc': 0.8156070164865074, 'val true negative': 381, 'val false negative': 116, 'val false positive': 235, 'val true positive': 552}\n```\n\n### Deploy\n\nOnce you have successfully trained a model using the step above, you should have a model checkpoint saved in `model_checkpoints/random_forest`.\n\nNow build your deployment Docker image:\n```\ndocker build . -f deploy/Dockerfile.serve -t fake-news-deploy\n```\n\nOnce your image is built, you can run the model locally via a REST API with:\n```\ndocker run -p 8000:80 -e MODEL_DIR=\"/home/fake-news/random_forest\" -e MODULE_NAME=\"fake_news.server.main\" fake-news-deploy\n```\n\nFrom here you can interact with the API using [Postman](https://www.postman.com/) or through a simple cURL request:\n```\ncurl -X POST http://127.0.0.1:8000/api/predict-fakeness -d '{\"text\": \"some example string\"}'\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmihail911%2Ffake-news","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmihail911%2Ffake-news","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmihail911%2Ffake-news/lists"}