Pytorch spam detection email detection text classification text-classification en model-index region:us
---
language:
- en
library_name: Pytorch
library_version: 2.0.1+cu118
metrics:
- accuracy
pipeline_tag: text-classification
tags:
- spam detection
- email detection
- text classification
inference: true
model-index:
- name: foduucom/Mail-spam-detection
  results:
  - task:
      type: text-classification
    metrics:
    - type: precision
      value: 0.866
---


# Model Card for Text Classification for email-spam detection
This model is based on Text classification using pytorch library. In this model we propose to used a torchtext library for tokenize & vectorize data.
This model is used in corporate and industrial area for mail detection. It is used three label like job, enquiry and spam.
It achieve the following results on the evalution set:
- accuracy : 0.866

## model architecture for text classification :

<p align="center">
<!-- Smaller size image -->
<img src="https://huggingface.co/foduucom/Mail-spam-detection/resolve/main/text%20classification.jpeg" alt="Image" style="width:600px; height:400px;">
</p>

### Label for text classification:
- Enquiry
- Job
- Spam

### Training hyperparameters

The following hyperparameters were used during training:
- learning_rate: 0.01
- train_batch_size: 64
- step_size: 10
- optimizer: Adam 
- lr_scheduler_type: StepLR
- lr_scheduler.StepLR:(optimizer,step_size=10,gamma=0.1)
- num_epochs: 10



### Framework versions
- Pytorch 2.0.1+cu118
- torchtext 0.15.2+cpu


```bibtex
@ModelCard{
  author    = {Nehul Agrawal and
               Rahul parihar},
  title     = {Text classification},
  year      = {2023}
}
```