How to use from the
Use from the
Transformers library
# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("text-classification", model="orisuchy/Descriptive_Classifier")
# Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification

tokenizer = AutoTokenizer.from_pretrained("orisuchy/Descriptive_Classifier")
model = AutoModelForSequenceClassification.from_pretrained("orisuchy/Descriptive_Classifier")
Quick Links

Descriptive Sentences Classifier

Based on AlephBERT model.

Metrics

accuracy: 0.813953488372093
f1: 0.8181818181818182

How to Use the model:

from transformers import pipeline
classifier = pipeline("text-classification",model='orisuchy/Descriptive_Classifier', return_all_scores=True)
outputs = classifier("מסווג חתיך במיוחד")
print(outputs)

"""
Output:
[[
{'label': 'Descriptive', 'score': 0.999764621257782},
{'label': 'Not Descriptive', 'score': 0.00023541577684227377}]]
"""

Or, if you want only the final class:

from transformers import pipeline
classifier = pipeline("text-classification",model='orisuchy/Descriptive_Classifier')
output = classifier("הלכתי אליו הביתה וחיכיתי")
print(output)

"""
Output:
[{'label': 'Not Descriptive', 'score': 0.999901533126831}]
"""

Created by Daniel Smotritsky & Ori Suchy
GitHub

Downloads last month
14
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Dataset used to train orisuchy/Descriptive_Classifier