Instructions to use regel-corpus/hunflair2-regel2-enhancer with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Flair
How to use regel-corpus/hunflair2-regel2-enhancer with Flair:
from flair.models import SequenceTagger tagger = SequenceTagger.load("regel-corpus/hunflair2-regel2-enhancer") - Notebooks
- Google Colab
- Kaggle
Info
- HunFlair2 (biomedical flair) for enhancer entity
- pre-trained language model: michiyasunaga/BioLinkBERT-base
- fine-tuned on RegEl corpus for
Enhancerentity type
Predicts 1 tag:
| tag | meaning |
|---|---|
| Enhancer | DNA enhancer region |
Demo: How to use in Flair
Requires:
- Flair>=0.15.1 (
pip install flairorpip install git+https://github.com/flairNLP/flair.git)
from flair.data import Sentence
from flair.nn import Classifier
from flair.tokenization import SciSpacyTokenizer
text = "An upstream activator of the mitogen-activated protein (MAP) kinase pathways was used to isolate an enhancer element located between -89 and -50 bp in PAI-1 promoter that was activated by MEKK-1."
sentence = Sentence(text, use_tokenizer=SciSpacyTokenizer())
tagger = Classifier.load("regel-corpus/hunflair2-regel2-enhancer")
tagger.predict(sentence)
print('The following NER tags are found:')
# iterate over entities and print
for entity in sentence.get_spans('ner'):
print(entity)
- Downloads last month
- -