Skip to content

This project aims to build a spam filter using a fine-tuned ALBERT (A Lite BERT) Transformer model. The ALBERT model, pre-trained on a large corpus of text, is fine-tuned on a spam detection dataset to create an efficient and accurate spam filter.

License

Notifications You must be signed in to change notification settings

NotShrirang/Spam-Filter-using-ALBERT

Repository files navigation

Spam Filter using ALBERT

This project aims to build a spam filter using a fine-tuned ALBERT (A Lite BERT) Transformer model. The ALBERT model, pre-trained on a large corpus of text, is fine-tuned on a spam detection dataset to create an efficient and accurate spam filter.

Table of Contents

Overview

A transformers based deep learning for binary text classification. There are 2 classes "Spam" and "Not spam". Model and dataset is deployed on HuggingFace.

Usage

To use this classifier in your code:

from transformers import AutoTokenizer, AutoModelForSequenceClassification, pipeline

tokenizer = AutoTokenizer.from_pretrained("NotShrirang/albert-spam-filter")
model = AutoModelForSequenceClassification.from_pretrained("NotShrirang/albert-spam-filter")

classifier = pipeline('text-classification',
                model=model,
                tokenizer=tokenizer
             )

prediction = classifier("<Your Text>")[0]

Installation:

To run this project, you will need Python and Streamlit installed on your system. You can install the required packages using the provided requirements.txt file.

  1. Clone Repo:
git clone https://github.com/NotShrirang/Spam-Filter-using-ALBERT.git
  1. Change project directory:
cd Spam-Filter-using-ALBERT
  1. Get requirements:
pip install -r requirements.txt

Run Streamlit Web App:

streamlit run app.py

About

This project aims to build a spam filter using a fine-tuned ALBERT (A Lite BERT) Transformer model. The ALBERT model, pre-trained on a large corpus of text, is fine-tuned on a spam detection dataset to create an efficient and accurate spam filter.

Topics

Resources

License

Stars

Watchers

Forks