Text Classification
setfit
Safetensors
sentence-transformers
bert
generated_from_setfit_trainer
text-embeddings-inference
Instructions to use Tomiwajin/setfit_email_classifier with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- setfit
How to use Tomiwajin/setfit_email_classifier with setfit:
from setfit import SetFitModel model = SetFitModel.from_pretrained("Tomiwajin/setfit_email_classifier") preds = model.predict(["i loved the spiderman movie!", "pineapple on pizza is the worst"]) print(preds) - sentence-transformers
How to use Tomiwajin/setfit_email_classifier with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("Tomiwajin/setfit_email_classifier") sentences = [ "The weather is lovely today.", "It's so sunny outside!", "He drove to the stadium." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] - Notebooks
- Google Colab
- Kaggle
|
Download usage_example.md from Tomiwajin/setfit_email_classifier: direct link, hf CLI and curl.
- Browser
- Download file 916 Bytes
-
https://huggingface.co/Tomiwajin/setfit_email_classifier/resolve/main/usage_example.md
- Command line
-
hf download hf://Tomiwajin/setfit_email_classifier/usage_example.md
-
curl -L -o usage_example.md https://huggingface.co/Tomiwajin/setfit_email_classifier/resolve/main/usage_example.md
916 Bytes
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