Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,27 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: mit
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
base_model:
|
| 4 |
+
- google-t5/t5-small
|
| 5 |
+
pipeline_tag: text-generation
|
| 6 |
+
tags:
|
| 7 |
+
- literature
|
| 8 |
+
---
|
| 9 |
+
|
| 10 |
+
# compnet-renard/t5-small-literary-relation-extraction
|
| 11 |
+
|
| 12 |
+
A generative relation extraction model trained on the [Despina/project_gutenberg](https://huggingface.co/datasets/Despina/project_gutenberg) dataset.
|
| 13 |
+
|
| 14 |
+
Example usage:
|
| 15 |
+
|
| 16 |
+
```python
|
| 17 |
+
from transformers import pipeline
|
| 18 |
+
|
| 19 |
+
pipeline = pipeline("text2text-generation", model="compnet-renard/t5-small-literary-relation-extraction")
|
| 20 |
+
text = "Zarth Arn is Shorr Kann enemy."
|
| 21 |
+
pipeline(f"extract relations: {text}")[0]["generated_text"]
|
| 22 |
+
```
|
| 23 |
+
```
|
| 24 |
+
>>> "(Zarth Arn, enemy_of, Shorr Kann)"
|
| 25 |
+
```
|
| 26 |
+
|
| 27 |
+
This model is intended to be used with Renard 0.7+.
|