Add multilingual to the language tag
#1
by
lbourdois
- opened
README.md
CHANGED
@@ -1,30 +1,35 @@
|
|
1 |
-
---
|
2 |
-
language:
|
3 |
-
- vi
|
4 |
-
- vn
|
5 |
-
- en
|
6 |
-
|
7 |
-
|
8 |
-
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
metrics:
|
13 |
-
- squad
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
nlp = pipeline('question-answering', model=model_checkpoint,
|
23 |
-
tokenizer=model_checkpoint)
|
24 |
-
QA_input = {
|
25 |
-
'question': "what is the capital of Vietnam",
|
26 |
-
'context': "Keeping an ageless charm through centuries, Hanoi - the capital of Vietnam is famous not only for the Old Quarter with narrow and crowded streets but also for the nostalgic feeling that it brings. While Saigon is a young and modern city, the ancient Hanoi is still a true beholder of history."
|
27 |
-
}
|
28 |
-
res = nlp(QA_input)
|
29 |
-
print('pipeline: {}'.format(res))
|
30 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language:
|
3 |
+
- vi
|
4 |
+
- vn
|
5 |
+
- en
|
6 |
+
- multilingual
|
7 |
+
tags:
|
8 |
+
- question-answering
|
9 |
+
- pytorch
|
10 |
+
datasets:
|
11 |
+
- squad
|
12 |
+
metrics:
|
13 |
+
- squad
|
14 |
+
pipeline_tag: question-answering
|
15 |
+
widget:
|
16 |
+
- text: what is the capital of Vietnam ?
|
17 |
+
context: Keeping an ageless charm through centuries, Hanoi - the capital of Vietnam
|
18 |
+
is famous not only for the Old Quarter with narrow and crowded streets but also
|
19 |
+
for the nostalgic feeling that it brings. While Saigon is a young and modern city,
|
20 |
+
the ancient Hanoi is still a true beholder of history.
|
21 |
+
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
|
23 |
+
|
24 |
+
```python
|
25 |
+
from transformers import pipeline
|
26 |
+
model_checkpoint = "aicryptogroup/distill-xlm-mrc"
|
27 |
+
nlp = pipeline('question-answering', model=model_checkpoint,
|
28 |
+
tokenizer=model_checkpoint)
|
29 |
+
QA_input = {
|
30 |
+
'question': "what is the capital of Vietnam",
|
31 |
+
'context': "Keeping an ageless charm through centuries, Hanoi - the capital of Vietnam is famous not only for the Old Quarter with narrow and crowded streets but also for the nostalgic feeling that it brings. While Saigon is a young and modern city, the ancient Hanoi is still a true beholder of history."
|
32 |
+
}
|
33 |
+
res = nlp(QA_input)
|
34 |
+
print('pipeline: {}'.format(res))
|
35 |
+
|