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.data import Sentence from flair.models import SequenceTagger tagger = SequenceTagger.load("INIST-CNRS/rapido") sentence = Sentence("George Washington went to Washington.") tagger.predict(sentence) print(sentence) - Notebooks
- Google Colab
- Kaggle
|
Download README.md from INIST-CNRS/rapido: direct link, hf CLI and curl.
- Browser
- Download file 1.1 kB
-
https://huggingface.co/INIST-CNRS/rapido/resolve/main/README.md
- Command line
-
hf download hf://INIST-CNRS/rapido/README.md
-
curl -L -o README.md https://huggingface.co/INIST-CNRS/rapido/resolve/main/README.md
1.1 kB
metadata
language:
- fr
pipeline_tag: token-classification
library_name: flair
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