File size: 1,348 Bytes
46b5225 e14b87b 46b5225 e14b87b 46b5225 e14b87b 46b5225 e14b87b 46b5225 e14b87b 46b5225 e14b87b 46b5225 e14b87b 46b5225 e14b87b 46b5225 e14b87b 46b5225 e14b87b 46b5225 e14b87b 46b5225 e14b87b 46b5225 |
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 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
---
library_name: transformers
pipeline_tag: text-classification
tags:
- text-classification
- voicemail-detection
- bert
- pytorch
license: apache-2.0
---
# Voicemail Detection Model (3-Utterance)
Binary classification model to detect voicemail vs human on phone calls.
## Performance
### Validation Set
- Accuracy: 0.9703
- Precision: 0.9005
- Recall: 0.9794
- F1: 0.9383
### Test Set
- Accuracy: 0.8353
- Precision: 0.6678
- Recall: 0.9895
- F1: 0.7975
## Details
Base: prajjwal1/bert-tiny
Threshold: 0.1153
Training: 2025-10-04
## Usage
```python
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
model_id = "Adya662/bert-tiny-amd"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForSequenceClassification.from_pretrained(model_id)
model.eval()
text = "Hi you've reached voicemail"
encoding = tokenizer(
text,
return_tensors='pt',
max_length=128,
padding='max_length',
truncation=True
)
with torch.no_grad():
outputs = model(**encoding)
# Assuming label 1 = voicemail (update if different)
probs = torch.softmax(outputs.logits, dim=-1)
probability = probs[0, 1].item()
optimal_threshold = 0.1153
prediction = "voicemail" if probability >= optimal_threshold else "human"
print({"probability": probability, "prediction": prediction})
```
|