Token Classification
GLiNER2
Safetensors
GLiNER
English
ner
named-entity-recognition
world-bank
datasets
data-use
lora
adapter
forced-displacement
refugees
fcv
Instructions to use ai4data/datause-extraction with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- GLiNER2
How to use ai4data/datause-extraction with GLiNER2:
from gliner2 import GLiNER2 model = GLiNER2.from_pretrained("ai4data/datause-extraction") # Extract entities text = "Apple CEO Tim Cook announced iPhone 15 in Cupertino yesterday." result = extractor.extract_entities(text, ["company", "person", "product", "location"]) print(result) - GLiNER
How to use ai4data/datause-extraction with GLiNER:
from gliner import GLiNER model = GLiNER.from_pretrained("ai4data/datause-extraction") - Notebooks
- Google Colab
- Kaggle
Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -26,7 +26,7 @@ metrics:
|
|
| 26 |
- f1
|
| 27 |
---
|
| 28 |
|
| 29 |
-
# datause-extraction
|
| 30 |
|
| 31 |
This repository contains the LoRA fine-tuned adapter weights (`v12-rerun`) for dataset mention extraction. It is trained on top of the base model `fastino/gliner2-large-v1`.
|
| 32 |
|
|
@@ -85,7 +85,7 @@ text = (
|
|
| 85 |
# Extract dataset mentions using this specific adapter
|
| 86 |
result = extract_from_text(
|
| 87 |
text,
|
| 88 |
-
adapter_id="
|
| 89 |
include_confidence=True
|
| 90 |
)
|
| 91 |
|
|
@@ -117,7 +117,7 @@ else:
|
|
| 117 |
model = GLiNER2.from_pretrained("fastino/gliner2-large-v1", **kwargs)
|
| 118 |
|
| 119 |
# 2. Download and apply the LoRA adapter weights
|
| 120 |
-
adapter_path = snapshot_download("
|
| 121 |
model.load_adapter(adapter_path)
|
| 122 |
|
| 123 |
# 3. Perform inference
|
|
|
|
| 26 |
- f1
|
| 27 |
---
|
| 28 |
|
| 29 |
+
# datause-extraction
|
| 30 |
|
| 31 |
This repository contains the LoRA fine-tuned adapter weights (`v12-rerun`) for dataset mention extraction. It is trained on top of the base model `fastino/gliner2-large-v1`.
|
| 32 |
|
|
|
|
| 85 |
# Extract dataset mentions using this specific adapter
|
| 86 |
result = extract_from_text(
|
| 87 |
text,
|
| 88 |
+
adapter_id="ai4data/datause-extraction",
|
| 89 |
include_confidence=True
|
| 90 |
)
|
| 91 |
|
|
|
|
| 117 |
model = GLiNER2.from_pretrained("fastino/gliner2-large-v1", **kwargs)
|
| 118 |
|
| 119 |
# 2. Download and apply the LoRA adapter weights
|
| 120 |
+
adapter_path = snapshot_download("ai4data/datause-extraction")
|
| 121 |
model.load_adapter(adapter_path)
|
| 122 |
|
| 123 |
# 3. Perform inference
|