Instructions to use PaDaS-Lab/privacy-policy-relation-extraction with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use PaDaS-Lab/privacy-policy-relation-extraction with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="PaDaS-Lab/privacy-policy-relation-extraction")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("PaDaS-Lab/privacy-policy-relation-extraction") model = AutoModelForSequenceClassification.from_pretrained("PaDaS-Lab/privacy-policy-relation-extraction", device_map="auto") - Notebooks
- Google Colab
- Kaggle
|
Download README.md from PaDaS-Lab/privacy-policy-relation-extraction: direct link, hf CLI and curl.
- Browser
- Download file 1.18 kB
-
https://huggingface.co/PaDaS-Lab/privacy-policy-relation-extraction/resolve/main/README.md
- Command line
-
hf download hf://PaDaS-Lab/privacy-policy-relation-extraction/README.md
-
curl -L -o README.md https://huggingface.co/PaDaS-Lab/privacy-policy-relation-extraction/resolve/main/README.md
1.18 kB
metadata
license: mit
language: en
tags:
- relation-extraction
widget:
- text: >-
We store your basic account information, including your name, username,
and email address until you ask us to delete them.
- text: >-
When we transfer the personal data of users in the EEA, UK and/or
Switzerland, we rely on the Standard Contractual Clauses approved by the
European Commission for such transfers or other transfer mechanisms deemed
'adequate' under applicable laws.
- text: >-
We collect information about the apps, browsers, and devices you use to
access Google services, which helps us provide features like automatic
product updates and dimming your screen if your battery runs low.
Use:
from transformers import pipeline
pipe = pipeline("text-classification", model="PaDaS-Lab/privacy-policy-relation-extraction", return_all_scores=True)
example = "We store your basic account information, including your name, username, and email address until you ask us to delete them."
results = pipe(example)
threshold = 0.5
print([result for result in results[0] if result['score'] >= threshold])
