Update README.md
Browse files
README.md
CHANGED
@@ -31,6 +31,26 @@ This model release is part of a joint research project with Howard University.
|
|
31 |
This model is intended to provide accurate answers to questions based on context passages. It can be used for a variety of tasks, including question-answering for search engines, chatbots, customer service systems, and other applications that require natural language understanding.
|
32 |
|
33 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
# Training Details
|
35 |
|
36 |
The model was trained for 1 epoch on the MRQA training set.
|
|
|
31 |
This model is intended to provide accurate answers to questions based on context passages. It can be used for a variety of tasks, including question-answering for search engines, chatbots, customer service systems, and other applications that require natural language understanding.
|
32 |
|
33 |
|
34 |
+
# How to Use
|
35 |
+
|
36 |
+
```python
|
37 |
+
from transformers import pipeline
|
38 |
+
|
39 |
+
question_answerer = pipeline("question-answering", model='VMware/bert-base-mrqa')
|
40 |
+
|
41 |
+
context = "We present the results of the Machine Reading for Question Answering (MRQA) 2019 shared task on evaluating the generalization capabilities of reading comprehension systems. In this task, we adapted and unified 18 distinct question answering datasets into the same format. Among them, six datasets were made available for training, six datasets were made available for development, and the final six were hidden for final evaluation. Ten teams submitted systems, which explored various ideas including data sampling, multi-task learning, adversarial training and ensembling. The best system achieved an average F1 score of 72.5 on the 12 held-out datasets, 10.7 absolute points higher than our initial baseline based on BERT."
|
42 |
+
|
43 |
+
question = "What is MRQA?"
|
44 |
+
|
45 |
+
result = question_answerer(question=question, context=context)
|
46 |
+
|
47 |
+
print(result)
|
48 |
+
|
49 |
+
# {'score': 0.9254004955291748, 'start': 30, 'end': 68, 'answer': 'Machine Reading for Question Answering'}
|
50 |
+
|
51 |
+
```
|
52 |
+
|
53 |
+
|
54 |
# Training Details
|
55 |
|
56 |
The model was trained for 1 epoch on the MRQA training set.
|