Update README.md
Browse files
README.md
CHANGED
@@ -15,11 +15,13 @@ NUM_LABELS= len(labels)
|
|
15 |
id2label={id:label for id,label in enumerate(labels)}
|
16 |
|
17 |
label2id={label:id for id,label in enumerate(labels)}
|
|
|
18 |
|
19 |
```
|
20 |
tokenizer = BertTokenizerFast.from_pretrained("bert-base-uncased", max_length=512)
|
21 |
model = BertForSequenceClassification.from_pretrained("bert-base-uncased", num_labels=NUM_LABELS, id2label=id2label, label2id=label2id)
|
22 |
|
|
|
23 |
```
|
24 |
def predict(text):
|
25 |
"""
|
|
|
15 |
id2label={id:label for id,label in enumerate(labels)}
|
16 |
|
17 |
label2id={label:id for id,label in enumerate(labels)}
|
18 |
+
```
|
19 |
|
20 |
```
|
21 |
tokenizer = BertTokenizerFast.from_pretrained("bert-base-uncased", max_length=512)
|
22 |
model = BertForSequenceClassification.from_pretrained("bert-base-uncased", num_labels=NUM_LABELS, id2label=id2label, label2id=label2id)
|
23 |
|
24 |
+
```
|
25 |
```
|
26 |
def predict(text):
|
27 |
"""
|