DeepMount00
commited on
Commit
•
4f9e677
1
Parent(s):
4fc37ce
Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,27 @@
|
|
1 |
-
---
|
2 |
-
license: apache-2.0
|
3 |
-
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: apache-2.0
|
3 |
+
---
|
4 |
+
|
5 |
+
## Installation
|
6 |
+
To use this model, you must install the GLiNER Python library:
|
7 |
+
```
|
8 |
+
!pip install gliner
|
9 |
+
```
|
10 |
+
|
11 |
+
## Usage
|
12 |
+
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`.
|
13 |
+
|
14 |
+
```python
|
15 |
+
from gliner import GLiNER
|
16 |
+
|
17 |
+
model = GLiNER.from_pretrained("DeepMount00/GLiNER_ITA_BASE")
|
18 |
+
|
19 |
+
text = """..."""
|
20 |
+
|
21 |
+
labels = ["label1", "label2"]
|
22 |
+
|
23 |
+
entities = model.predict_entities(text, labels)
|
24 |
+
|
25 |
+
for entity in entities:
|
26 |
+
print(entity["text"], "=>", entity["label"])
|
27 |
+
```
|