🚀 roberta-base用于Qasper问答任务
本项目基于deepset/roberta-base-squad2
进行训练,可用于问答任务,借助Qasper数据集实现高效问答功能。
🚀 快速开始
本项目基于deepset/roberta-base-squad2
进行训练,可用于问答任务。以下是使用Python代码调用模型的示例:
💻 使用示例
基础用法
from transformers import AutoModelForQuestionAnswering, AutoTokenizer, pipeline
model_name = "z-uo/roberta-qasper"
nlp = pipeline('question-answering', model=model_name, tokenizer=model_name)
QA_input = {
'question': 'what they propose?',
'context': "In this paper, we provide an innovative contribution in the research domain dedicated to crop mapping by exploiting the of Sentinel-2 satellite images time series, with the specific aim to extract information on 'where and when' crops are grown. The final goal is to set up a workflow able to reliably identify (classify) the different crops that are grown in a given area by exploiting an end-to-end (3+2)D convolutional neural network (CNN) for semantic segmentation. The method also has the ambition to provide information, at pixel level, regarding the period in which a given crop is cultivated during the season. To this end, we propose a solution called Class Activation Interval (CAI) which allows us to interpret, for each pixel, the reasoning made by CNN in the classification determining in which time interval, of the input time series, the class is likely to be present or not. Our experiments, using a public domain dataset, show that the approach is able to accurately detect crop classes with an overall accuracy of about 93% and that the network can detect discriminatory time intervals in which crop is cultivated. These results have twofold importance: (i) demonstrate the ability of the network to correctly interpret the investigated physical process (i.e., bare soil condition, plant growth, senescence and harvesting according to specific cultivated variety) and (ii) provide further information to the end-user (e.g., the presence of crops and its temporal dynamics)."
}
res = nlp(QA_input)
model = AutoModelForQuestionAnswering.from_pretrained(model_name)
tokenizer = AutoTokenizer.from_pretrained(model_name)
高级用法
📄 信息表格
属性 |
详情 |
模型类型 |
基于roberta-base 的问答模型 |
训练数据 |
z-uo/qasper-squad 数据集 |