noharm-ai/substance-dataset
Viewer • Updated • 81k • 20
How to use noharm-ai/substance-prediction with Flair:
from flair.models import SequenceTagger
tagger = SequenceTagger.load("noharm-ai/substance-prediction")from flair.models import TextClassifier
from flair.data import Sentence
# load the model
classifier = TextClassifier.load('noharm-ai/substance-prediction')
# make a sentence
sentence = Sentence('Tylenon 750 mg')
# predict Substance tags
classifier.predict(sentence)
# print the sentence with the tags
print(sentence)
Base model
neuralmind/bert-base-portuguese-cased