setfit_email_classifier / usage_example.md
Tomiwajin's picture
Upload 15 files
3f88486 verified

How to use your trained SetFit model

Load the model

from setfit import SetFitModel

# Load your trained model
model = SetFitModel.from_pretrained('setfit_email_classifier_20250921_101223')

Make predictions

# 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-09-21 10:12:24
  • Type: SetFit Email Classifier