Update README.md
Browse files
README.md
CHANGED
@@ -36,18 +36,17 @@ license: cc-by-nc-4.0
|
|
36 |
|
37 |
## Usage
|
38 |
``` python
|
39 |
-
from transformers import RobertaTokenizerFast,
|
40 |
|
41 |
# Load fine-tuned MRC model by HuggingFace Model Hub
|
42 |
HUGGINGFACE_MODEL_PATH = "bespin-global/klue-roberta-small-3i4k-intent-classification"
|
43 |
-
loaded_tokenizer = RobertaTokenizerFast.from_pretrained(
|
44 |
-
loaded_model =
|
45 |
|
46 |
# using Pipeline
|
47 |
text_classifier = TextClassificationPipeline(
|
48 |
tokenizer=loaded_tokenizer,
|
49 |
model=loaded_model,
|
50 |
-
framework='tf',
|
51 |
return_all_scores=True
|
52 |
)
|
53 |
|
|
|
36 |
|
37 |
## Usage
|
38 |
``` python
|
39 |
+
from transformers import RobertaTokenizerFast, RobertaForSequenceClassification, TextClassificationPipeline
|
40 |
|
41 |
# Load fine-tuned MRC model by HuggingFace Model Hub
|
42 |
HUGGINGFACE_MODEL_PATH = "bespin-global/klue-roberta-small-3i4k-intent-classification"
|
43 |
+
loaded_tokenizer = RobertaTokenizerFast.from_pretrained(HUGGINGFACE_MODEL_PATH )
|
44 |
+
loaded_model = RobertaForSequenceClassification.from_pretrained(HUGGINGFACE_MODEL_PATH )
|
45 |
|
46 |
# using Pipeline
|
47 |
text_classifier = TextClassificationPipeline(
|
48 |
tokenizer=loaded_tokenizer,
|
49 |
model=loaded_model,
|
|
|
50 |
return_all_scores=True
|
51 |
)
|
52 |
|