Update README.md
Browse files
README.md
CHANGED
|
@@ -10,6 +10,7 @@ pipeline_tag: text-classification
|
|
| 10 |
base_model: "distilbert/distilbert-base-uncased"
|
| 11 |
widget:
|
| 12 |
- text: "Left context. [SEP] Right context."
|
|
|
|
| 13 |
---
|
| 14 |
|
| 15 |
# DistilBERT Cross Segment Document Chunking
|
|
@@ -43,16 +44,16 @@ model = AutoModelForSequenceClassification.from_pretrained(
|
|
| 43 |
|
| 44 |
pairs = [
|
| 45 |
"Left context. [SEP] Right context.",
|
| 46 |
-
"
|
| 47 |
]
|
| 48 |
pipe = TextClassificationPipeline(model=model, tokenizer=tokenizer, return_all_scores=True)
|
| 49 |
|
| 50 |
pipe(pairs)
|
| 51 |
|
| 52 |
-
[[{'label': 'SAME', 'score': 0.
|
| 53 |
-
{'label': 'DIFFERENT', 'score': 0.
|
| 54 |
-
[{'label': 'SAME', 'score': 0.
|
| 55 |
-
{'label': 'DIFFERENT', 'score': 0.
|
| 56 |
```
|
| 57 |
|
| 58 |
## Training Data
|
|
|
|
| 10 |
base_model: "distilbert/distilbert-base-uncased"
|
| 11 |
widget:
|
| 12 |
- text: "Left context. [SEP] Right context."
|
| 13 |
+
- text: "They have 6 grandchildren. [SEP] Ane is currently coaching Crestwood High School's Boys Varsity Soccer."
|
| 14 |
---
|
| 15 |
|
| 16 |
# DistilBERT Cross Segment Document Chunking
|
|
|
|
| 44 |
|
| 45 |
pairs = [
|
| 46 |
"Left context. [SEP] Right context.",
|
| 47 |
+
"They have 6 grandchildren. [SEP] Ane is currently coaching Crestwood High School's Boys Varsity Soccer.",
|
| 48 |
]
|
| 49 |
pipe = TextClassificationPipeline(model=model, tokenizer=tokenizer, return_all_scores=True)
|
| 50 |
|
| 51 |
pipe(pairs)
|
| 52 |
|
| 53 |
+
[[{'label': 'SAME', 'score': 0.986},
|
| 54 |
+
{'label': 'DIFFERENT', 'score': 0.015}],
|
| 55 |
+
[{'label': 'SAME', 'score': 0.212},
|
| 56 |
+
{'label': 'DIFFERENT', 'score': 0.788}]]
|
| 57 |
```
|
| 58 |
|
| 59 |
## Training Data
|