imvladikon
commited on
Commit
•
2b8bf11
1
Parent(s):
3477301
Update README.md
Browse files
README.md
CHANGED
@@ -12,7 +12,7 @@ model-index:
|
|
12 |
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
13 |
should probably proofread and complete it, then remove this comment. -->
|
14 |
|
15 |
-
#
|
16 |
|
17 |
Simple experimental model that was trained in 3 epochs on very small dataset
|
18 |
|
@@ -45,6 +45,24 @@ print(pipe("London is the capital city of England and the United Kingdom"))
|
|
45 |
"""
|
46 |
```
|
47 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
|
49 |
|
50 |
This model is a fine-tuned version of [t5-large](https://huggingface.co/t5-large) on the private(en) dataset.
|
|
|
12 |
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
13 |
should probably proofread and complete it, then remove this comment. -->
|
14 |
|
15 |
+
# T5-Encoder(T5-large model) fine-tuned on very small dataset for token classification
|
16 |
|
17 |
Simple experimental model that was trained in 3 epochs on very small dataset
|
18 |
|
|
|
45 |
"""
|
46 |
```
|
47 |
|
48 |
+
## Usage in spacy
|
49 |
+
|
50 |
+
```bash
|
51 |
+
pip install spacy transformers git+https://github.com/explosion/spacy-huggingface-pipelines -q
|
52 |
+
```
|
53 |
+
|
54 |
+
```python
|
55 |
+
import spacy
|
56 |
+
from spacy import displacy
|
57 |
+
|
58 |
+
text = "My name is Sarah and I live in London"
|
59 |
+
|
60 |
+
nlp = spacy.blank("en")
|
61 |
+
nlp.add_pipe("hf_token_pipe", config={"model": "imvladikon/t5-english-ner", "kwargs": {"trust_remote_code":True}})
|
62 |
+
doc = nlp(text)
|
63 |
+
print(doc.ents)
|
64 |
+
# (Sarah, London)
|
65 |
+
```
|
66 |
|
67 |
|
68 |
This model is a fine-tuned version of [t5-large](https://huggingface.co/t5-large) on the private(en) dataset.
|