anhtunguyen98 lbourdois commited on
Commit
272559b
1 Parent(s): 41ba30c

Add multilingual to the language tag (#1)

Browse files

- Add multilingual to the language tag (724d9179f1a6afff6d115926bbe8ce17edabb89e)


Co-authored-by: Loïck BOURDOIS <lbourdois@users.noreply.huggingface.co>

Files changed (1) hide show
  1. README.md +34 -29
README.md CHANGED
@@ -1,30 +1,35 @@
1
- ---
2
- language:
3
- - vi
4
- - vn
5
- - en
6
- tags:
7
- - question-answering
8
- - pytorch
9
- datasets:
10
- - squad
11
- pipeline_tag: question-answering
12
- metrics:
13
- - squad
14
- widget:
15
- - text: "what is the capital of Vietnam ?"
16
- 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."
17
- ---
18
-
19
- ```python
20
- from transformers import pipeline
21
- model_checkpoint = "aicryptogroup/distill-xlm-mrc"
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
+