Update README with installable gliner; add library_name
#1
by
tomaarsen
HF Staff
- opened
README.md
CHANGED
|
@@ -2,6 +2,7 @@
|
|
| 2 |
license: apache-2.0
|
| 3 |
datasets:
|
| 4 |
- numind/NuNER
|
|
|
|
| 5 |
---
|
| 6 |
# Model Card for GLiNER-medium-v2
|
| 7 |
|
|
@@ -15,18 +16,16 @@ This version has been trained on the NuNER dataset (commercially permissive)
|
|
| 15 |
* Repository: https://github.com/urchade/GLiNER
|
| 16 |
|
| 17 |
## Installation
|
| 18 |
-
To use this model, you must
|
| 19 |
```
|
| 20 |
-
!
|
| 21 |
-
%cd GLiNER
|
| 22 |
-
!pip install -r requirements.txt
|
| 23 |
```
|
| 24 |
|
| 25 |
## Usage
|
| 26 |
-
Once you've downloaded the GLiNER
|
| 27 |
|
| 28 |
```python
|
| 29 |
-
from
|
| 30 |
|
| 31 |
model = GLiNER.from_pretrained("urchade/gliner_mediumv2")
|
| 32 |
|
|
|
|
| 2 |
license: apache-2.0
|
| 3 |
datasets:
|
| 4 |
- numind/NuNER
|
| 5 |
+
library_name: gliner
|
| 6 |
---
|
| 7 |
# Model Card for GLiNER-medium-v2
|
| 8 |
|
|
|
|
| 16 |
* Repository: https://github.com/urchade/GLiNER
|
| 17 |
|
| 18 |
## Installation
|
| 19 |
+
To use this model, you must install the GLiNER Python library:
|
| 20 |
```
|
| 21 |
+
!pip install gliner
|
|
|
|
|
|
|
| 22 |
```
|
| 23 |
|
| 24 |
## Usage
|
| 25 |
+
Once you've downloaded the GLiNER library, you can import the GLiNER class. You can then load this model using `GLiNER.from_pretrained` and predict entities with `predict_entities`.
|
| 26 |
|
| 27 |
```python
|
| 28 |
+
from gliner import GLiNER
|
| 29 |
|
| 30 |
model = GLiNER.from_pretrained("urchade/gliner_mediumv2")
|
| 31 |
|