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="notaphoenix/shakespeare_classifier_model")
# Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification

tokenizer = AutoTokenizer.from_pretrained("notaphoenix/shakespeare_classifier_model")
model = AutoModelForSequenceClassification.from_pretrained("notaphoenix/shakespeare_classifier_model")
Quick Links

Shakespeare/Modern English DistilBert-base

Description β„Ή

With this model, you can classify if an English sentence has a Shakespearean style or a modern style

The model is a fine-tuned checkpoint of DistilBERT-base-uncased.

Application πŸš€

Return all labels

from transformers import pipeline
classifier = pipeline("text-classification", model="notaphoenix/shakespeare_classifier_model", top_k=None)
classifier("This is a modern sentence!")
[[
{'label': 'modern', 'score': 0.901931643486023},
{'label': 'shakespearean', 'score': 0.09806833416223526}
]]

Return top label

from transformers import pipeline
classifier = pipeline("text-classification", model="notaphoenix/shakespeare_classifier_model")
classifier("This is a modern sentence!")
[
{'label': 'modern', 'score': 0.901931643486023}
]
Downloads last month
17
Safetensors
Model size
67M params
Tensor type
F32
Β·
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Dataset used to train notaphoenix/shakespeare_classifier_model