CoolFace
Modelpublic

apperry-ai/fact_extraction_roberta_crf

sourceHugging Faceupdated 3y agoView on Hugging Face
0likes10downloads
Model Card

Supported Labels

[‘Family’, ‘Pet’, ‘Job’,  ‘Likes’, ‘Dislikes’]

How to use

  • Load model and perform prediction:
python
from tner import TransformersNER

model = TransformersNER("apperry-ai/fact_extraction_roberta")
output = model.predict(["My mom and dad is planning a big reunion next weekend"])
for entity in output['entity_prediction'][0]:
                print(f"Type: {entity['type']}")
                print(f"Entity: {', '.join(entity['entity'])}")
                print(f"Position: {', '.join(map(str, entity['position']))}")
                print(f"Probability: {', '.join(map(str, entity['probability']))}\n")