Aukrk commited on
Commit
c2758b1
·
verified ·
1 Parent(s): 7b7ec69

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +141 -28
README.md CHANGED
@@ -1,61 +1,174 @@
1
 
2
  ---
3
  license: apache-2.0
 
 
4
  tags:
 
5
  - text-classification
6
- - sms-spam
7
  - distilbert
 
8
  - mlops
 
 
 
9
  - iit-jodhpur
10
  - group-36
11
  - G25AIT2016
12
  datasets:
13
  - ucirvine/sms_spam
14
  base_model: distilbert-base-uncased
15
- pipeline_tag: text-classification
 
16
  ---
17
 
18
- # MLOPS_group-v4
19
-
20
- This Hugging Face repository is part of the MLOps Group 36 project for the PGD AI Programme, IIT Jodhpur.
21
 
22
- ## Project
23
 
24
- SMS Spam Classification using DistilBERT.
25
 
26
  ## Contributor
27
 
28
- Anu Kumar
29
- Roll Number: G25AIT2016
30
 
31
- ## Contribution
32
 
33
- This version is linked to the Task 2 data preparation workflow completed by G25AIT2016.
 
 
 
 
 
 
34
 
35
- The data preparation workflow included:
36
 
37
- - Loading the UCI SMS Spam Collection dataset
38
- - Text cleaning and normalisation
39
- - Duplicate removal
40
- - Stratified train, validation, and test split
41
- - Label mapping for ham and spam classes
42
- - Sanity checks
43
- - Data versioning and traceability
44
- - W&B run logging for data-preparation metrics
45
 
46
- ## Links
47
 
48
- Kaggle Notebook: https://www.kaggle.com/code/anukumarkg25ait2016/mlops-group36-data-preprocessing-g25ait2016
49
 
50
- W&B Run: https://wandb.ai/g25ait2032-iit-jodhpur/MLOPS_Group/runs/j5fk4zll
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
51
 
52
- GitHub Repository: https://github.com/g25ait2032-prog/mlops-group36-iitj
 
53
 
54
- ## Labels
 
 
55
 
56
- - 0: ham
57
- - 1: spam
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
58
 
59
  ## Model Context
60
 
61
- The model artefact is based on the Group 36 DistilBERT SMS spam classification workflow and is published under the G25AIT2016 Hugging Face account for project traceability.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
 
2
  ---
3
  license: apache-2.0
4
+ library_name: transformers
5
+ pipeline_tag: text-classification
6
  tags:
7
+ - transformers
8
  - text-classification
 
9
  - distilbert
10
+ - sms-spam
11
  - mlops
12
+ - kaggle
13
+ - wandb
14
+ - huggingface
15
  - iit-jodhpur
16
  - group-36
17
  - G25AIT2016
18
  datasets:
19
  - ucirvine/sms_spam
20
  base_model: distilbert-base-uncased
21
+ language:
22
+ - en
23
  ---
24
 
25
+ # MLOPS_group-v4 — SMS Spam Classification
 
 
26
 
27
+ This repository is part of the **MLOps Group 36 Project** for the **PGD AI Programme, IIT Jodhpur**.
28
 
29
+ The project implements an end-to-end MLOps pipeline for SMS spam classification using **DistilBERT**, with GitHub, Kaggle, Weights & Biases, Hugging Face Hub, Docker, and GitHub Actions.
30
 
31
  ## Contributor
32
 
33
+ **Anu Kumar**
34
+ Roll Number: **G25AIT2016**
35
 
36
+ ## Project Links
37
 
38
+ | Resource | Link |
39
+ |---|---|
40
+ | GitHub Repository | https://github.com/g25ait2032-prog/mlops-group36-iitj |
41
+ | Kaggle Notebook - G25AIT2016 | https://www.kaggle.com/code/anukumarkg25ait2016/mlops-group36-data-preprocessing-g25ait2016 |
42
+ | W&B Run - G25AIT2016 | https://wandb.ai/g25ait2032-iit-jodhpur/MLOPS_Group/runs/j5fk4zll |
43
+ | W&B Project Dashboard | https://wandb.ai/g25ait2032-iit-jodhpur/MLOPS_Group |
44
+ | Hugging Face Model | https://huggingface.co/Aukrk/MLOPS_group-v4 |
45
 
46
+ ## Model Details
47
 
48
+ | Item | Value |
49
+ |---|---|
50
+ | Base model | distilbert-base-uncased |
51
+ | Task | Binary text classification |
52
+ | Classes | ham, spam |
53
+ | Dataset | UCI SMS Spam Collection |
54
+ | Framework | Hugging Face Transformers |
55
+ | Output labels | 0 = ham, 1 = spam |
56
 
57
+ ## Contribution Summary
58
 
59
+ This repository is linked to the **G25AIT2016 Task 2 workflow**.
60
 
61
+ The completed contribution includes:
62
+
63
+ - Loading the UCI SMS Spam dataset
64
+ - Cleaning and normalising SMS text
65
+ - Removing missing and duplicate records
66
+ - Creating stratified train, validation, and test splits
67
+ - Creating `id2label.json` and `label2id.json`
68
+ - Running data sanity checks
69
+ - Logging data-preparation metrics to W&B
70
+ - Publishing this Hugging Face model repository for project traceability
71
+
72
+ ## Dataset Preparation Summary
73
+
74
+ | Metric | Value |
75
+ |---|---:|
76
+ | Raw samples | 5,574 |
77
+ | Duplicates removed | 415 |
78
+ | Cleaned samples | 5,159 |
79
+ | Train rows | 3,611 |
80
+ | Validation rows | 774 |
81
+ | Test rows | 774 |
82
+ | Sanity checks passed | 21 / 21 |
83
+ | Leakage check | Passed |
84
+
85
+ ## Label Mapping
86
+
87
+ ```json
88
+ {
89
+ "0": "ham",
90
+ "1": "spam"
91
+ }
92
+ ```
93
+
94
+ ## How to Use
95
+
96
+ ```python
97
+ from transformers import pipeline
98
+
99
+ classifier = pipeline(
100
+ "text-classification",
101
+ model="Aukrk/MLOPS_group-v4"
102
+ )
103
+
104
+ text = "Congratulations! You have won a free iPhone. Click here now."
105
+ result = classifier(text)
106
+
107
+ print(result)
108
+ ```
109
+
110
+ ## Load Model Directly
111
 
112
+ ```python
113
+ from transformers import AutoTokenizer, AutoModelForSequenceClassification
114
 
115
+ tokenizer = AutoTokenizer.from_pretrained("Aukrk/MLOPS_group-v4")
116
+ model = AutoModelForSequenceClassification.from_pretrained("Aukrk/MLOPS_group-v4")
117
+ ```
118
 
119
+ ## Example Inputs
120
+
121
+ | Text | Expected Output |
122
+ |---|---|
123
+ | Congratulations! You have won a free prize. Click here now. | spam |
124
+ | Can we meet tomorrow at 5 PM? | ham |
125
+
126
+ ## W&B Traceability
127
+
128
+ The G25AIT2016 W&B run records data-preparation metrics such as:
129
+
130
+ - Raw sample count
131
+ - Duplicate removal count
132
+ - Cleaned sample count
133
+ - Train / validation / test split sizes
134
+ - Sanity check status
135
+ - Leakage check status
136
+
137
+ W&B Run: https://wandb.ai/g25ait2032-iit-jodhpur/MLOPS_Group/runs/j5fk4zll
138
 
139
  ## Model Context
140
 
141
+ This model repository is published under the G25AIT2016 Hugging Face account for Group 36 project traceability.
142
+
143
+ The model artefact follows the Group 36 DistilBERT SMS spam classification workflow and is linked with the data-preparation contribution completed by Anu Kumar - G25AIT2016.
144
+
145
+ ## Limitations
146
+
147
+ - The dataset is relatively small and focused on SMS messages.
148
+ - The model may not generalise well to long emails, non-English messages, or modern scam formats.
149
+ - Boundary cases mixing normal conversation and promotional text may be misclassified.
150
+ - This is an academic MLOps demonstration and should not be used as the only spam detection control in production.
151
+
152
+ ## Intended Use
153
+
154
+ This repository is intended for:
155
+
156
+ - Academic MLOps demonstration
157
+ - SMS spam classification testing
158
+ - Hugging Face deployment evidence
159
+ - W&B traceability evidence
160
+ - GitHub Actions / Docker inference integration
161
+
162
+ ## Not Intended For
163
+
164
+ - Production-grade fraud detection
165
+ - Legal, financial, or safety-critical filtering
166
+ - Detecting all phishing or scam variants without further validation
167
+
168
+ ## Authors
169
+
170
+ MLOps Group 36
171
+ PGD AI Programme, IIT Jodhpur
172
+
173
+ Contributor for this repository:
174
+ **Anu Kumar - G25AIT2016**