Downloads · 30 days
36
4% of all-time downloads
yirenl2/plm_qa
plm_qa is a question answering model from yirenl2. Use it when the input is a question plus a passage. It is set up for transformers. The card lists the license as cc-by-4.0.
We fine-tuned the roBERTa-based model (https://huggingface.co/deepset/roberta-base-squad2) over LiveSafe community safety dialogue data for event argument extraction with the objective of question-answering.
Downloads · 30 days
36
4% of all-time downloads
All-time downloads
908
Public
Repo size
993 MB
Likes
0
Public
Click a slice to open those files.
.bin496 MB · 99%
From the Hugging Face model README
We fine-tuned the roBERTa-based model (https://huggingface.co/deepset/roberta-base-squad2) over LiveSafe community safety dialogue data for event argument extraction with the objective of question-answering.
from transformers import AutoModelForQuestionAnswering, AutoTokenizer, pipeline
model_name = "yirenl2/plm_qa"
# a) Get predictions
nlp = pipeline('question-answering', model=model_name, tokenizer=model_name)
QA_input = {
'question': 'What is the location of the incident?',
'context': 'I was attacked by someone in front of the bus station.'
}
res = nlp(QA_input)
# b) Load model & tokenizer
model = AutoModelForQuestionAnswering.from_pretrained(model_name)
tokenizer = AutoTokenizer.from_pretrained(model_name)