File size: 985 Bytes
eb86a17 edfcd45 eb86a17 edfcd45 |
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 |
# How to use your trained SetFit model
## Load the model
```python
from setfit import SetFitModel
# Load your trained model
model = SetFitModel.from_pretrained('setfit_email_classifier_20251008_230918')
```
## Make predictions
```python
# Predict single email
email_text = "Thank you for your application. We will review it shortly."
prediction = model([email_text])
print(f"Classification: {prediction[0]}")
# Predict multiple emails
emails = [
"We would like to schedule an interview with you.",
"Unfortunately, we cannot move forward with your application.",
"Please submit the following additional documents."
]
predictions = model(emails)
for email, pred in zip(emails, predictions):
print(f"Email: {email[:50]}...")
print(f"Classification: {pred}\n")
```
## Model Info
- Base Model: sentence-transformers/all-MiniLM-L6-v2
- Trained: 2025-10-08 23:09:19
- Type: SetFit Email Classifier (Optimized)
- Training Config: 5 iterations, 1 epoch (fast training)
|