π SVM Defect Classifier (Text-based)
This model is trained using Sentence-BERT (MiniLM) embeddings and a Support Vector Machine (SVM) classifier.
It predicts defect types from text descriptions.
π Model Details
- Text Embeddings:
all-MiniLM-L6-v2(fromsentence-transformers) - Classifier: SVM with RBF Kernel
- Format:
.pkl(Pickle)
π How to Use the Model
First, install dependencies:
pip install sentence-transformers scikit-learn joblib huggingface_hub
from sentence_transformers import SentenceTransformer model = SentenceTransformer("dexter191/text-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]