Update README.md
Browse files
README.md
CHANGED
@@ -7,6 +7,18 @@ This model is for English extractive question answering. It is based on the [ber
|
|
7 |
[English SQuAD v2.0](https://rajpurkar.github.io/SQuAD-explorer/)
|
8 |
|
9 |
# How to use
|
|
|
|
|
|
|
10 |
``` python
|
11 |
-
import
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
```
|
|
|
7 |
[English SQuAD v2.0](https://rajpurkar.github.io/SQuAD-explorer/)
|
8 |
|
9 |
# How to use
|
10 |
+
|
11 |
+
You can use this model directly with a pipeline:
|
12 |
+
|
13 |
``` python
|
14 |
+
from transformers.pipelines import pipeline
|
15 |
+
from transformers import AutoTokenizer, AutoModelForQuestionAnswering
|
16 |
+
|
17 |
+
tokenizer = AutoTokenizer.from_pretrained("zhufy/squad-en-bert-base")
|
18 |
+
model = AutoModelForQuestionAnswering.from_pretrained("zhufy/squad-en-bert-base")
|
19 |
+
|
20 |
+
nlp = pipeline("quesiton-answering", model="zhufy/squad-en-bert-base", tokenizer="zhufy/squad-en-bert-base")
|
21 |
+
|
22 |
+
pipeline("question-answering", model="distilbert-base-cased-distilled-squad", tokenizer="bert-base-cased")
|
23 |
+
|
24 |
```
|