satjawat commited on
Commit
dd1c3d4
1 Parent(s): eecaab8

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +3 -3
README.md CHANGED
@@ -16,12 +16,12 @@ pip install transformers
16
 
17
  # Example
18
  ```python
19
- from transformers import PegasusForConditionalGeneration, AutoTokenizer
20
 
21
- model = PegasusForConditionalGeneration.from_pretrained("satjawat/pegasus-x-thai-sum")
22
  tokenizer = AutoTokenizer.from_pretrained("satjawat/pegasus-x-thai-sum")
23
 
24
- new_input_string = "ข้อความทดสอบ"
25
  new_input_ids = tokenizer(new_input_string.lower(), return_tensors="pt").input_ids
26
  summary_ids = model.generate(new_input_ids, max_length=50, num_beams=6, length_penalty=2.0, early_stopping=True)
27
  summary = tokenizer.decode(summary_ids[0], skip_special_tokens=True)
 
16
 
17
  # Example
18
  ```python
19
+ from transformers import PegasusXForConditionalGeneration, AutoTokenizer
20
 
21
+ model = PegasusXForConditionalGeneration.from_pretrained("satjawat/pegasus-x-thai-sum")
22
  tokenizer = AutoTokenizer.from_pretrained("satjawat/pegasus-x-thai-sum")
23
 
24
+ new_input_string = "ข้อความ"
25
  new_input_ids = tokenizer(new_input_string.lower(), return_tensors="pt").input_ids
26
  summary_ids = model.generate(new_input_ids, max_length=50, num_beams=6, length_penalty=2.0, early_stopping=True)
27
  summary = tokenizer.decode(summary_ids[0], skip_special_tokens=True)