gogamza commited on
Commit
23dfd9c
1 Parent(s): 6b2ed56

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +2 -1
README.md CHANGED
@@ -10,6 +10,7 @@ license: MIT
10
  ## How to use
11
 
12
  ```python
 
13
  from transformers import PreTrainedTokenizerFast
14
  from transformers import BartForConditionalGeneration
15
 
@@ -22,7 +23,7 @@ model = BartForConditionalGeneration.from_pretrained('gogamza/kobart-summarizati
22
  text = "과거를 떠올려보자. 방송을 보던 우리의 모습을..."
23
 
24
  raw_input_ids = tokenizer.encode(text)
25
- input_ids = [tokenizer.bos_token_id] + \
26
  raw_input_ids + [tokenizer.eos_token_id]
27
  summary_ids = model.generate(torch.tensor([input_ids]),
28
  max_length=150,
 
10
  ## How to use
11
 
12
  ```python
13
+ import torch
14
  from transformers import PreTrainedTokenizerFast
15
  from transformers import BartForConditionalGeneration
16
 
 
23
  text = "과거를 떠올려보자. 방송을 보던 우리의 모습을..."
24
 
25
  raw_input_ids = tokenizer.encode(text)
26
+ input_ids = [tokenizer.bos_token_id] + \\
27
  raw_input_ids + [tokenizer.eos_token_id]
28
  summary_ids = model.generate(torch.tensor([input_ids]),
29
  max_length=150,