correct the spamDetectorModel.py#322
Open
student-smritipandey wants to merge 1 commit intoCode-A2Z:mainfrom
Open
correct the spamDetectorModel.py#322student-smritipandey wants to merge 1 commit intoCode-A2Z:mainfrom
student-smritipandey wants to merge 1 commit intoCode-A2Z:mainfrom
Conversation
|
Thank you for submitting your pull request! We'll review it as soon as possible. For further communication, join our discord server https://discord.gg/tSqtvHUJzE. |
Author
|
@Avdhesh-Varshney add the model + working video, please review it |
Avdhesh-Varshney
requested changes
Oct 5, 2025
| # Download & load model in one line (cached) | ||
| # --------------------------- | ||
| @st.cache_resource | ||
| def load_model_and_tokenizer(username="smritipandey02", notebook="spam-detection", out="kaggle_models"): |
Collaborator
There was a problem hiding this comment.
Plz import and use our built-in function from https://github.com/Code-A2Z/jarvis/blob/main/src/helpers/kaggle.py here
| # --------------------------- | ||
| # Streamlit UI | ||
| # --------------------------- | ||
| def spam_app(): |
Collaborator
There was a problem hiding this comment.
Follow all the guidelines from the README.md file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ISSUE: #70
This project is a text classification model that detects whether a given SMS/text message is Spam or Ham (Not Spam) using Deep Learning. The model was trained on a labeled dataset of SMS messages and deployed with a user-friendly Streamlit web application.
🔹 Project Workflow
Dataset used: https://www.kaggle.com/datasets/uciml/sms-spam-collection-dataset
Data Preprocessing
Cleaned and tokenized SMS messages
Converted text to sequences using Tokenizer
Applied padding to maintain equal input length (MAX_LEN = 100)
Model Architecture
Built using TensorFlow/Keras
Embedding layer for word representation
LSTM / Dense layers for sequential learning
Final sigmoid output layer for binary classification (Spam vs Ham)
Training & Evaluation
Optimizer: Adam
Loss function: Binary Crossentropy
Metrics: Accuracy
Achieved high classification performance on test data
Deployment
Model saved as spam_classifier.h5 / spam_classifier.keras
Tokenizer saved as tokenizer.pkl
Deployed using Streamlit for real-time predictions
🔹 Features
✅ Detects spam messages with high accuracy
✅ Returns prediction confidence score
✅ Interactive web UI using Streamlit
✅ Supports any user-entered SMS/text message
🔹 Example Predictions
Input: "Congratulations! You have won a $500 gift voucher. Click the link to claim."
→ 🚨 Spam detected! (Confidence: 99%)
Input: "Hey, are we still meeting tomorrow at 5?"
→ ✅ Ham (Not Spam) (Confidence: 100%)
🔹 Technologies Used
Python
TensorFlow / Keras
NLTK / Text Preprocessing
Streamlit
Pickle
Working Video 📷
https://github.com/student-smritipandey/Spam-Detector-Model/blob/main/model.mp4