File size: 1,052 Bytes
36bca16
 
 
 
 
 
 
 
 
202f0ae
 
 
2f5b347
202f0ae
a24c21d
202f0ae
a24c21d
202f0ae
2f5b347
202f0ae
a24c21d
202f0ae
06e6637
202f0ae
a24c21d
 
 
 
 
202f0ae
a24c21d
 
 
 
 
06e6637
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
---
license: mit
datasets:
- notaphoenix/shakespeare_dataset
language:
- en
metrics:
- f1
pipeline_tag: text-classification
---


# 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](https://huggingface.co/distilbert-base-uncased). 

# Application 🚀

## Return all labels

```python
from transformers import pipeline
classifier = pipeline("text-classification", model="notaphoenix/shakespeare_classifier_model", top_k=None)
classifier("This is a modern sentence!")
```

```json
[[
{'label': 'modern', 'score': 0.901931643486023},
{'label': 'shakespearean', 'score': 0.09806833416223526}
]]
```

## Return top label

```python
from transformers import pipeline
classifier = pipeline("text-classification", model="notaphoenix/shakespeare_classifier_model")
classifier("This is a modern sentence!")
```

```json
[
{'label': 'modern', 'score': 0.901931643486023}
]
```