Update README.md
Browse files
README.md
CHANGED
|
@@ -24,7 +24,7 @@ Related paper: [Fact-Preserved Personalized News Headline Generation](https://ie
|
|
| 24 |
|
| 25 |
|
| 26 |
Example on how to calculate the FactCC score :
|
| 27 |
-
```
|
| 28 |
from transformers import BertForSequenceClassification, BertTokenizer
|
| 29 |
model_path = 'THEATLAS/FactCC-PENS'
|
| 30 |
|
|
@@ -54,7 +54,7 @@ print(f"fact_scores: {fact_scores}")
|
|
| 54 |
This is a more modern implementation of the model and code from [the original github repo](https://github.com/salesforce/factCC)
|
| 55 |
|
| 56 |
This model is trained to predict whether a summary is factual with respect to the original text. Basic usage:
|
| 57 |
-
```
|
| 58 |
from transformers import BertForSequenceClassification, BertTokenizer
|
| 59 |
model_path = 'THEATLAS/FactCC-PENS'
|
| 60 |
|
|
@@ -72,7 +72,7 @@ model.config.id2label[pred.item()] # prints: INCORRECT
|
|
| 72 |
```
|
| 73 |
|
| 74 |
It can also be used with a pipeline. Beware that since pipelines are not thought to be used with pair of sentences, and you have to use this double-list hack:
|
| 75 |
-
```
|
| 76 |
>>> from transformers import pipeline
|
| 77 |
|
| 78 |
>>> pipe=pipeline(model="THEATLAS/FactCC-PENS")
|
|
|
|
| 24 |
|
| 25 |
|
| 26 |
Example on how to calculate the FactCC score :
|
| 27 |
+
```python
|
| 28 |
from transformers import BertForSequenceClassification, BertTokenizer
|
| 29 |
model_path = 'THEATLAS/FactCC-PENS'
|
| 30 |
|
|
|
|
| 54 |
This is a more modern implementation of the model and code from [the original github repo](https://github.com/salesforce/factCC)
|
| 55 |
|
| 56 |
This model is trained to predict whether a summary is factual with respect to the original text. Basic usage:
|
| 57 |
+
```python
|
| 58 |
from transformers import BertForSequenceClassification, BertTokenizer
|
| 59 |
model_path = 'THEATLAS/FactCC-PENS'
|
| 60 |
|
|
|
|
| 72 |
```
|
| 73 |
|
| 74 |
It can also be used with a pipeline. Beware that since pipelines are not thought to be used with pair of sentences, and you have to use this double-list hack:
|
| 75 |
+
```bash
|
| 76 |
>>> from transformers import pipeline
|
| 77 |
|
| 78 |
>>> pipe=pipeline(model="THEATLAS/FactCC-PENS")
|