Sihao Chen
commited on
Commit
·
30f9723
1
Parent(s):
cd27fa8
Update README.md
Browse files
README.md
CHANGED
|
@@ -10,8 +10,8 @@ license: cc-by-sa-4.0
|
|
| 10 |
datasets:
|
| 11 |
- xsum
|
| 12 |
widget:
|
| 13 |
-
- text: "<s> Ban Ki-moon was elected for a second term in 2007 </s></s> Ban-
|
| 14 |
-
- text: "<s> Ban Ki-moon was elected for a second term in 2011 </s></s> Ban-
|
| 15 |
|
| 16 |
---
|
| 17 |
|
|
@@ -31,10 +31,10 @@ from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
|
| 31 |
tokenizer = AutoTokenizer.from_pretrained("CogComp/bart-faithful-summary-detector")
|
| 32 |
model = AutoModelForSequenceClassification.from_pretrained("CogComp/bart-faithful-summary-detector")
|
| 33 |
|
| 34 |
-
article = "Ban Ki-Moon was re-elected for a second term by the UN General Assembly, unopposed and unanimously, on 21 June 2011"
|
| 35 |
|
| 36 |
-
bad_summary = "Ban Ki-moon was elected for a second term in 2007"
|
| 37 |
-
good_summary = "Ban Ki-moon was elected for a second term in 2011"
|
| 38 |
|
| 39 |
bad_pair = tokenizer(text=bad_summary, text_pair=article, return_tensors='pt')
|
| 40 |
good_pair = tokenizer(text=good_summary, text_pair=article, return_tensors='pt')
|
|
|
|
| 10 |
datasets:
|
| 11 |
- xsum
|
| 12 |
widget:
|
| 13 |
+
- text: "<s> Ban Ki-moon was elected for a second term in 2007. </s></s> Ban Ki-Moon was re-elected for a second term by the UN General Assembly, unopposed and unanimously, on 21 June 2011."
|
| 14 |
+
- text: "<s> Ban Ki-moon was elected for a second term in 2011. </s></s> Ban Ki-Moon was re-elected for a second term by the UN General Assembly, unopposed and unanimously, on 21 June 2011."
|
| 15 |
|
| 16 |
---
|
| 17 |
|
|
|
|
| 31 |
tokenizer = AutoTokenizer.from_pretrained("CogComp/bart-faithful-summary-detector")
|
| 32 |
model = AutoModelForSequenceClassification.from_pretrained("CogComp/bart-faithful-summary-detector")
|
| 33 |
|
| 34 |
+
article = "Ban Ki-Moon was re-elected for a second term by the UN General Assembly, unopposed and unanimously, on 21 June 2011."
|
| 35 |
|
| 36 |
+
bad_summary = "Ban Ki-moon was elected for a second term in 2007."
|
| 37 |
+
good_summary = "Ban Ki-moon was elected for a second term in 2011."
|
| 38 |
|
| 39 |
bad_pair = tokenizer(text=bad_summary, text_pair=article, return_tensors='pt')
|
| 40 |
good_pair = tokenizer(text=good_summary, text_pair=article, return_tensors='pt')
|