File size: 1,869 Bytes
9325625
4a0e0e0
8dda02a
 
 
 
 
 
 
 
95a1caa
2035d0d
9325625
 
e7eab99
9325625
e7eab99
9325625
e7eab99
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
---
title: Spam Classifier Agent
emoji: 🚀
colorFrom: red
colorTo: red
sdk: docker
app_port: 8501
tags:
- streamlit
pinned: false
short_description: Detects SPAM messages
license: mit
---

# 📧 Spam Classifier Agent Live Demo

A Streamlit web application that leverages a fine-tuned GPT-2 model to classify text messages as either "SPAM" or "NOT SPAM". This agent helps users quickly determine the nature of a message. Try it here @ [SoggyBurritos/Spam_Classifier_Agent](https://huggingface.co/spaces/SoggyBurritos/Spam_Classifier_Agent)

## ✨ Features

* **Text Input:** Easily enter any text message for classification.
* **Real-time Prediction:** Get instant results on whether the message is spam or not.
* **Probability Scores:** View the confidence scores for both "SPAM" and "NOT SPAM" categories.
* **Intuitive UI:** A clean and user-friendly interface built with Streamlit.
* **Fine-tuned GPT-2 Model:** Utilizes a powerful transformer model for accurate classification.

## 💻 How to Use

1.  **Enter Text:** Type or paste the message you want to classify into the provided text area.
2.  **Analyze:** Click the "Analyze Text" button.
3.  **View Results:** The application will display the prediction (SPAM or NOT SPAM) along with the probability scores.

## ⚙️ Technical Details for Hugging Face Spaces

**App File Location:**
The main Streamlit application script is located at `streamlit/app/main.py`. Hugging Face Spaces will be configured to run this specific file.

**Dependencies:**
All required Python packages for this deployment is listed in `requirements.txt`.

**Model & Data:**
* The fine-tuned GPT-2 model weights (`Spam-Classifier-GPT2-Model.pt`) are expected to be in the `models/` directory at the root of the repository.
* The application also relies on data preparation scripts which may download or create necessary data files.