Update README.md
Browse files
README.md
CHANGED
@@ -24,8 +24,11 @@ ROC-AUC score: 0.86
|
|
24 |
## Usage:
|
25 |
```python
|
26 |
from transformers import T5ForConditionalGeneration, T5Tokenizer
|
|
|
|
|
|
|
27 |
tokenizer = T5Tokenizer.from_pretrained("etomoscow/T5_paraphrase_detector")
|
28 |
-
model = T5ForConditionalGeneration.from_pretrained("etomoscow/T5_paraphrase_detector")
|
29 |
text_1 = 'During her sophomore , junior and senior summers , she spent half of it with her Alaska team , and half playing , and living in Oregon .'
|
30 |
text_2 = 'During her second , junior and senior summers , she spent half of it with her Alaska team , half playing and living in Oregon.'
|
31 |
true_label = '1'
|
|
|
24 |
## Usage:
|
25 |
```python
|
26 |
from transformers import T5ForConditionalGeneration, T5Tokenizer
|
27 |
+
import torch
|
28 |
+
# use GPU for better performance
|
29 |
+
device = torch.device('cuda')
|
30 |
tokenizer = T5Tokenizer.from_pretrained("etomoscow/T5_paraphrase_detector")
|
31 |
+
model = T5ForConditionalGeneration.from_pretrained("etomoscow/T5_paraphrase_detector").to(device)
|
32 |
text_1 = 'During her sophomore , junior and senior summers , she spent half of it with her Alaska team , and half playing , and living in Oregon .'
|
33 |
text_2 = 'During her second , junior and senior summers , she spent half of it with her Alaska team , half playing and living in Oregon.'
|
34 |
true_label = '1'
|