Instructions to use urchade/gliner_multi-v2.1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- GLiNER
How to use urchade/gliner_multi-v2.1 with GLiNER:
from gliner import GLiNER model = GLiNER.from_pretrained("urchade/gliner_multi-v2.1") - Notebooks
- Google Colab
- Kaggle
Is it possible to use Gliner with at token level instead of text?
#2
by polodealvarado - opened
Hello @urchade !
Thank you for such amazing model.
I would like to know if it is possible to run it at token level (list of words) instead of using directly a text.
Something like:
model.predict_entities(["Albert","is","living","in","Paris","."], labels = ["person name","location"])
Hi @polodealvarado , you can joint you token lists with whitespace and use a whitespace splitter for tokenization
model.words_splitter = WordsSplitter("whitespace")
text = " ".join(["Albert","is","living","in","Paris","."])
polodealvarado changed discussion status to closed