Update README.md with correct model name in "Direct use for inference" (#3)
Browse files- Update README.md with correct model name in "Direct use for inference" (d1d4d029b7edbf419533605654123c4cd7e676ea)
- Naming typos in code snippets (9d960ca3af3f5bc9a57d6e810dfd4cd2d2d860fd)
Co-authored-by: Krum Arnaudov <[email protected]>
README.md
CHANGED
|
@@ -155,7 +155,7 @@ This is a [SpanMarker](https://github.com/tomaarsen/SpanMarkerNER) model trained
|
|
| 155 |
from span_marker import SpanMarkerModel
|
| 156 |
|
| 157 |
# Download from the 🤗 Hub
|
| 158 |
-
model = SpanMarkerModel.from_pretrained("guishe/span-marker-generic-
|
| 159 |
# Run inference
|
| 160 |
entities = model.predict("Most of the Steven Seagal movie \"Under Siege \"(co-starring Tommy Lee Jones) was filmed on the, which is docked on Mobile Bay at Battleship Memorial Park and open to the public.")
|
| 161 |
```
|
|
@@ -169,7 +169,7 @@ You can finetune this model on your own dataset.
|
|
| 169 |
from span_marker import SpanMarkerModel, Trainer
|
| 170 |
|
| 171 |
# Download from the 🤗 Hub
|
| 172 |
-
model = SpanMarkerModel.from_pretrained("guishe/span-marker-generic-
|
| 173 |
|
| 174 |
# Specify a Dataset with "tokens" and "ner_tag" columns
|
| 175 |
dataset = load_dataset("conll2003") # For example CoNLL2003
|
|
@@ -181,7 +181,7 @@ trainer = Trainer(
|
|
| 181 |
eval_dataset=dataset["validation"],
|
| 182 |
)
|
| 183 |
trainer.train()
|
| 184 |
-
trainer.save_model("guishe/span-marker-generic-
|
| 185 |
```
|
| 186 |
</details>
|
| 187 |
|
|
|
|
| 155 |
from span_marker import SpanMarkerModel
|
| 156 |
|
| 157 |
# Download from the 🤗 Hub
|
| 158 |
+
model = SpanMarkerModel.from_pretrained("guishe/span-marker-generic-ner-v1-fewnerd-fine-super")
|
| 159 |
# Run inference
|
| 160 |
entities = model.predict("Most of the Steven Seagal movie \"Under Siege \"(co-starring Tommy Lee Jones) was filmed on the, which is docked on Mobile Bay at Battleship Memorial Park and open to the public.")
|
| 161 |
```
|
|
|
|
| 169 |
from span_marker import SpanMarkerModel, Trainer
|
| 170 |
|
| 171 |
# Download from the 🤗 Hub
|
| 172 |
+
model = SpanMarkerModel.from_pretrained("guishe/span-marker-generic-ner-v1-fewnerd-fine-super")
|
| 173 |
|
| 174 |
# Specify a Dataset with "tokens" and "ner_tag" columns
|
| 175 |
dataset = load_dataset("conll2003") # For example CoNLL2003
|
|
|
|
| 181 |
eval_dataset=dataset["validation"],
|
| 182 |
)
|
| 183 |
trainer.train()
|
| 184 |
+
trainer.save_model("guishe/span-marker-generic-ner-v1-fewnerd-fine-super-finetuned")
|
| 185 |
```
|
| 186 |
</details>
|
| 187 |
|