{"id":23617137,"url":"https://github.com/samp1012/spam_email_detector","last_synced_at":"2025-06-22T19:34:46.683Z","repository":{"id":268997486,"uuid":"906101349","full_name":"samp1012/Spam_Email_Detector","owner":"samp1012","description":null,"archived":false,"fork":false,"pushed_at":"2024-12-20T07:57:20.000Z","size":1015,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-18T07:11:50.724Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","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/samp1012.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-20T07:01:11.000Z","updated_at":"2024-12-20T07:58:26.000Z","dependencies_parsed_at":"2024-12-20T08:25:28.525Z","dependency_job_id":"5e243868-ec9b-42fa-a0a8-a4d5321b6a77","html_url":"https://github.com/samp1012/Spam_Email_Detector","commit_stats":null,"previous_names":["samp1012/spam_email_detector"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/samp1012/Spam_Email_Detector","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samp1012%2FSpam_Email_Detector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samp1012%2FSpam_Email_Detector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samp1012%2FSpam_Email_Detector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samp1012%2FSpam_Email_Detector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samp1012","download_url":"https://codeload.github.com/samp1012/Spam_Email_Detector/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samp1012%2FSpam_Email_Detector/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261352397,"owners_count":23146049,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-12-27T18:16:55.668Z","updated_at":"2025-06-22T19:34:41.666Z","avatar_url":"https://github.com/samp1012.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Spam Email and SMS Detector\n\nThis project is a machine learning-based application designed to classify email and SMS messages as spam or not spam. It utilizes natural language processing (NLP) techniques and various classification algorithms to achieve accurate predictions.\n\n## Table of Contents\n\n- [Features](#features)\n- [Project Structure](#project-structure)\n- [Installation](#installation)\n- [Usage](#usage)\n- [Model Training](#model-training)\n- [Saved Models](#saved-models)\n- [Technologies Used](#technologies-used)\n- [Contact](#contact)\n\n## Features\n\n- **Spam Detection**: Classifies messages as spam or not spam with high accuracy.\n- **Text Preprocessing**: Performs text cleaning, tokenization, and vectorization to prepare data for modeling.\n- **Machine Learning Models**: Employs algorithms such as Naive Bayes and Logistic Regression.\n- **Web Application**: Provides a user-friendly interface built with Flask for message classification.\n- **Pre-trained Models**: Includes saved models and preprocessors for immediate use.\n\n## Project Structure\n\n```\nSpam_Email_Spam_Detector/\n├── spam.csv             # Dataset containing labeled SMS data\n├── main.ipynb           # Jupyter Notebook for model training and testing\n├── app.py               # Flask web application for spam detection\n├── preprocessor.pkl     # Saved preprocessor for text data\n├── model.pkl            # Saved machine learning model\n├── templates/           # HTML templates for the web application\n├── requirements.txt     # Python dependencies\n└── README.md            # Project documentation\n```\n\n## Installation\n\n1. **Clone the repository**:\n   ```bash\n   git clone https://github.com/samp1012/Spam_Email_Detector.git\n   cd Spam_Email_Detector\n   ```\n\n2. **Create and activate a virtual environment** (optional but recommended):\n   ```bash\n   python -m venv env\n   source env/bin/activate  # On Windows: env\\Scripts\\activate\n   ```\n\n3. **Install the required packages**:\n   ```bash\n   pip install -r requirements.txt\n   ```\n\n## Usage\n\n1. **Run the web application**:\n   ```bash\n   python app.py\n   ```\n\n2. **Access the application**:\n   Open your web browser and navigate to `http://127.0.0.1:5000/`.\n\n3. **Classify a message**:\n   - Enter the email or SMS text into the input field.\n   - Click the \"Predict\" button to determine if the message is spam.\n\n## Model Training\n\nTo train the model on new data or adjust parameters:\n\n1. **Open the Jupyter Notebook**:\n   ```bash\n   jupyter notebook main.ipynb\n   ```\n\n2. **Follow the steps in the notebook** to preprocess data, train the model, and evaluate performance.\n\n3. **Save the trained model and preprocessor**:\n   - Update the `model.pkl` and `preprocessor.pkl` files with the new models.\n\n\n## Saved Models\n\nThe project includes pre-trained files for quick predictions:\n- **preprocessor.pkl**: Text preprocessing pipeline.\n- **model.pkl**: Machine learning model for spam detection.\n\nThese files are used by the `app.py` script to process input data and generate predictions.\n\n\n## Technologies Used\n- **Python**\n- **Flask**: Web framework for deployment\n- **Pandas**: Data manipulation\n- **Scikit-learn**: Machine learning models\n- **Numpy**: Numerical operations\n- **Matplotlib/Seaborn**: Data visualization\n\n\n## Contact\nFor queries or suggestions:\n- **GitHub**: [samp1012](https://github.com/samp1012)\n- **Email**: samparkadas@gmail.com\n- **Linked In**: [Samparka Das](https://www.linkedin.com/in/samparka-das-b4317726b/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamp1012%2Fspam_email_detector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamp1012%2Fspam_email_detector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamp1012%2Fspam_email_detector/lists"}