Update README.md
Browse files
README.md
CHANGED
|
@@ -17,8 +17,10 @@ This is a fine-tuned BERT-based language model to classify NLP-related research
|
|
| 17 |
## How to use the fine-tuned model
|
| 18 |
|
| 19 |
```python
|
| 20 |
-
from transformers import pipeline
|
| 21 |
|
|
|
|
|
|
|
| 22 |
classifier = pipeline("text-classification", model="TimSchopf/nlp_survey_classifier", truncation=True, max_length=512, padding=True)
|
| 23 |
|
| 24 |
# prepare data
|
|
|
|
| 17 |
## How to use the fine-tuned model
|
| 18 |
|
| 19 |
```python
|
| 20 |
+
from transformers import pipeline, AutoTokenizer
|
| 21 |
|
| 22 |
+
# load tokenizer and init classification pipeline
|
| 23 |
+
tokenizer = AutoTokenizer.from_pretrained('TimSchopf/nlp_survey_classifier')
|
| 24 |
classifier = pipeline("text-classification", model="TimSchopf/nlp_survey_classifier", truncation=True, max_length=512, padding=True)
|
| 25 |
|
| 26 |
# prepare data
|