{"id":15909056,"url":"https://github.com/kartikchugh/spam-classifier","last_synced_at":"2026-02-12T18:01:10.017Z","repository":{"id":37625185,"uuid":"256558293","full_name":"KartikChugh/spam-classifier","owner":"KartikChugh","description":"ML-powered Flask app to perform spam classification of SMS messages. Uses TFIDF vectorization + logistic regression to achieve ~98% accuracy.","archived":false,"fork":false,"pushed_at":"2022-12-08T04:02:52.000Z","size":631,"stargazers_count":0,"open_issues_count":9,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-31T14:43:38.055Z","etag":null,"topics":["bootstrap","flask","logistic-regression","machine-learning","spam-filtering"],"latest_commit_sha":null,"homepage":"https://ml-spam-classifier.herokuapp.com/","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KartikChugh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-04-17T16:44:44.000Z","updated_at":"2020-09-17T01:36:44.000Z","dependencies_parsed_at":"2023-01-25T07:31:21.440Z","dependency_job_id":null,"html_url":"https://github.com/KartikChugh/spam-classifier","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/KartikChugh/spam-classifier","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KartikChugh%2Fspam-classifier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KartikChugh%2Fspam-classifier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KartikChugh%2Fspam-classifier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KartikChugh%2Fspam-classifier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KartikChugh","download_url":"https://codeload.github.com/KartikChugh/spam-classifier/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KartikChugh%2Fspam-classifier/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29375593,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-12T08:51:36.827Z","status":"ssl_error","status_checked_at":"2026-02-12T08:51:26.849Z","response_time":55,"last_error":"SSL_read: 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":["bootstrap","flask","logistic-regression","machine-learning","spam-filtering"],"created_at":"2024-10-06T14:41:39.431Z","updated_at":"2026-02-12T18:01:09.999Z","avatar_url":"https://github.com/KartikChugh.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Spam Classification App\nBuilt with [Flask](https://flask.palletsprojects.com/), powered by [Scikit-Learn](https://scikit-learn.org/), styled via [Bootstrap](https://getbootstrap.com/), and deployed through [Heroku](https://ml-spam-classifier.herokuapp.com/).\n\nSpam Classifier uses a logistic regression model to classify messages (preferably SMS) as spam or not spam with 98.21% accuracy.\n\n![example screenshot](screenshot.PNG)\n\n## Prerequisites\nMake sure that you have the following:\n* Python 3+ and pip (which comes with Python 3+)\n* A Unix command line (e.g. Git Bash).\n\n## Running the App\nWhat each file does:\n* `server.py` - runs the server and loads the user interface.\n* `templates/layout.html` - contains the base HTML\n* `templates/index.html` - contains the body of the HTML\n* `models/saved/` - contains all locally saved models and dataframes for future loading\n* `models/save_df.py` - cleans the dataframe and saves the new dataframe to local file structure.\n* `models/model.py` - builds and saves the logistic regression model.\n\nTo run the app, complete the following steps:\n1. Make sure you have Python 3 and a text editor installed.\n2. Install the `virtualenv` package using `pip install virtualenv`.\n3. Install the required packages using `pip install -r requirements.txt`. You can manually install them as you come across them if need be, but this will install them all for you. Note that if you add more packages, run `pip freeze \u003e requirements.txt` to save them to your requirements file.\n4. Create a virtual environment using `virtualenv \u003cenvironment-name\u003e` and start it using `source ./\u003cenvironment-name\u003e/Scripts/activate`. Note that the activate script directory might change depending on your operating system.\n5. Run the `models/save_df.py` file. This will save the cleaned dataframe as a csv under the `models/saved` directory.\n6. Run the `models/model.py` file. This will build the model and save it as a `.joblib` file under the `models/saved` directory. \n7. Run the `server.py` file. Make sure that the `saved/` directory contains both the `dataframe.csv` and `model.joblib` files.\n\n## More Info\nTo learn how to build your own spam classifier, refer to the [MLC@UVA tutorial](https://github.com/dylankfernandes/spam-classifier/blob/hosting/hosting.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkartikchugh%2Fspam-classifier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkartikchugh%2Fspam-classifier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkartikchugh%2Fspam-classifier/lists"}