Update README.md
Browse files
README.md
CHANGED
|
@@ -9,6 +9,20 @@ widget:
|
|
| 9 |
- text: "FOR EU USERS ONLY: When you use our site, pre-selected companies may access and use certain information on your device and about your interests to serve ads or personalized content. You may revisit or change consent-choices at any time by clicking here."
|
| 10 |
---
|
| 11 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
#### Performance:
|
| 13 |
|
| 14 |

|
|
|
|
| 9 |
- text: "FOR EU USERS ONLY: When you use our site, pre-selected companies may access and use certain information on your device and about your interests to serve ads or personalized content. You may revisit or change consent-choices at any time by clicking here."
|
| 10 |
---
|
| 11 |
|
| 12 |
+
#### Use:
|
| 13 |
+
|
| 14 |
+
```python
|
| 15 |
+
from transformers import pipeline
|
| 16 |
+
|
| 17 |
+
pipe = pipeline("text-classification", model="harshildarji/privacy-policy-relation-extraction", return_all_scores=True)
|
| 18 |
+
|
| 19 |
+
example = "We store your basic account information, including your name, username, and email address until you ask us to delete them."
|
| 20 |
+
results = pipe(example)
|
| 21 |
+
|
| 22 |
+
threshold = 0.5
|
| 23 |
+
print([result for result in results[0] if result['score'] >= threshold])
|
| 24 |
+
```
|
| 25 |
+
|
| 26 |
#### Performance:
|
| 27 |
|
| 28 |

|