GLiNER_ITA_BASE / README.md
DeepMount00's picture
Set "gliner" as the library (#2)
108f659 verified
|
raw
history blame
674 Bytes
metadata
license: apache-2.0
pipeline_tag: token-classification
language:
  - it
library_name: gliner

Installation

To use this model, you must install the GLiNER Python library:

!pip install gliner

Usage

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.

from gliner import GLiNER

model = GLiNER.from_pretrained("DeepMount00/GLiNER_ITA_BASE")

text = """..."""

labels = ["label1", "label2"]

entities = model.predict_entities(text, labels)

for entity in entities:
    print(entity["text"], "=>", entity["label"])