tripplyons commited on
Commit
c62cf6a
1 Parent(s): 743f8de

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +6 -0
README.md CHANGED
@@ -14,4 +14,10 @@ from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
14
 
15
  tokenizer = AutoTokenizer.from_pretrained("google/flan-t5-base")
16
  model = AutoModelForSeq2SeqLM.from_pretrained("tripplyons/flan-t5-base-xsum")
 
 
 
 
 
 
17
  ```
 
14
 
15
  tokenizer = AutoTokenizer.from_pretrained("google/flan-t5-base")
16
  model = AutoModelForSeq2SeqLM.from_pretrained("tripplyons/flan-t5-base-xsum")
17
+
18
+ input_text = "summarize: The ex-Reading defender denied fraudulent trading charges relating to the Sodje Sports Foundation - a charity to raise money for Nigerian sport. Mr Sodje, 37, is jointly charged with elder brothers Efe, 44, Bright, 50 and Stephen, 42. Appearing at the Old Bailey earlier, all four denied the offence. The charge relates to offences which allegedly took place between 2008 and 2014. Sam, from Kent, Efe and Bright, of Greater Manchester, and Stephen, from Bexley, are due to stand trial in July. They were all released on bail."
19
+ input_ids = tokenizer([input_text], max_length=512, truncation=True, padding=True, return_tensors='pt')['input_ids']
20
+ output = model.generate(input_ids, max_length=512)
21
+ output_text = tokenizer.decode(output[0], skip_special_tokens=True)
22
+ print(output_text)
23
  ```