dennispark commited on
Commit
d0717e5
ยท
1 Parent(s): ae6a6c0

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +2 -2
README.md CHANGED
@@ -23,9 +23,9 @@ from transformers import T5TokenizerFast, T5ForConditionalGeneration
23
  tokenizer = T5TokenizerFast.from_pretrained('paust/pko-t5-base')
24
  model = T5ForConditionalGeneration.from_pretrained('paust/pko-t5-base')
25
 
26
- input_ids = tokenizer(["nsmc sentence: ๋‹น์‹ ์˜ ์ด๋ฆ„์€ ๋ฌด์—‡์ธ๊ฐ€์š”?"]).input_ids
27
  labels = tokenizer(["T5 ์ž…๋‹ˆ๋‹ค."]).input_ids
28
- outputs = model(input_ids, labels)
29
 
30
  print(f"loss={outputs.loss} logits={outputs.logits}")
31
  ```
 
23
  tokenizer = T5TokenizerFast.from_pretrained('paust/pko-t5-base')
24
  model = T5ForConditionalGeneration.from_pretrained('paust/pko-t5-base')
25
 
26
+ input_ids = tokenizer(["qa question: ๋‹น์‹ ์˜ ์ด๋ฆ„์€ ๋ฌด์—‡์ธ๊ฐ€์š”?"]).input_ids
27
  labels = tokenizer(["T5 ์ž…๋‹ˆ๋‹ค."]).input_ids
28
+ outputs = model(input_ids=input_ids, labels=labels)
29
 
30
  print(f"loss={outputs.loss} logits={outputs.logits}")
31
  ```