Update README.md
Browse files
README.md
CHANGED
|
@@ -65,7 +65,8 @@ The following hyperparameters were used during training:
|
|
| 65 |
|
| 66 |
### How to Get Started with the Model
|
| 67 |
Use the code below to get started with the model.
|
| 68 |
-
|
|
|
|
| 69 |
from transformers import PreTrainedTokenizerFast, BartForConditionalGeneration
|
| 70 |
model_name = "jjae/kobart-hashtag"
|
| 71 |
tokenizer = PreTrainedTokenizerFast.from_pretrained(model_name)
|
|
@@ -77,4 +78,4 @@ def make_tag(text):
|
|
| 77 |
eos_token_id = model.config.eos_token_id, length_penalty = 2.0, max_length = 50, num_beams = 2)
|
| 78 |
decoded_output = tokenizer.decode(output[0], skip_special_tokens=True)
|
| 79 |
return decoded_output
|
| 80 |
-
|
|
|
|
| 65 |
|
| 66 |
### How to Get Started with the Model
|
| 67 |
Use the code below to get started with the model.
|
| 68 |
+
|
| 69 |
+
```
|
| 70 |
from transformers import PreTrainedTokenizerFast, BartForConditionalGeneration
|
| 71 |
model_name = "jjae/kobart-hashtag"
|
| 72 |
tokenizer = PreTrainedTokenizerFast.from_pretrained(model_name)
|
|
|
|
| 78 |
eos_token_id = model.config.eos_token_id, length_penalty = 2.0, max_length = 50, num_beams = 2)
|
| 79 |
decoded_output = tokenizer.decode(output[0], skip_special_tokens=True)
|
| 80 |
return decoded_output
|
| 81 |
+
```
|