Instructions to use INIST-CNRS/rapido with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Flair
How to use INIST-CNRS/rapido with Flair:
from flair.models import SequenceTagger tagger = SequenceTagger.load("INIST-CNRS/rapido") - Notebooks
- Google Colab
- Kaggle
Rapido's project Model
This model was trained with and meant to be used with datas from Rapido project. The package flair was used for the training. The following versions of Flair and Transformers are required :
- transformers == 4.41.2
- flair == 0.10
How to use
from flair.models import SequenceTagger
from flair.data import Sentence
tagger = SequenceTagger.load('rapido-model.pt')
your_sentence = "Put your sentence here"
sentence = Sentence(your_sentence)
self.tagger.predict(sentences)
for sentence in sentences:
for entity in sentence.get_spans('ner'):
if entity.tag == "LOC":
entity_txt = entity.text #get the entity
entity_score = '%.3f' % entity.score #get the score
print(entity_txt,score)
Validation score
precision recall f1-score support
LOC 0.8790 0.8563 0.8675 891
For more information
- Downloads last month
- -