muchad commited on
Commit
1108857
1 Parent(s): 5f4e388

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +19 -2
README.md CHANGED
@@ -15,11 +15,28 @@ license: apache-2.0
15
 
16
  # idT5 for Question Generation and Question Answering
17
 
18
- [Indonesian T5](https://huggingface.co/muchad/idt5) is fine-tuned on [translated SQuAD v2.0](https://github.com/Wikidepia/indonesian_datasets/tree/master/question-answering/squad) for **Question Generation and Question Answering** tasks.
19
 
20
  ## Requirements
21
  ```
22
  !pip install transformers==4.4.2
23
  !pip install sentencepiece==0.1.95
 
 
24
  ```
25
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
 
16
  # idT5 for Question Generation and Question Answering
17
 
18
+ [idT5](https://huggingface.co/muchad/idt5) (Indonesian version of [mT5](https://huggingface.co/google/mt5-base)) is fine-tuned on [translated SQuAD v2.0](https://github.com/Wikidepia/indonesian_datasets/tree/master/question-answering/squad) for **Question Generation and Question Answering** tasks.
19
 
20
  ## Requirements
21
  ```
22
  !pip install transformers==4.4.2
23
  !pip install sentencepiece==0.1.95
24
+ !git clone https://github.com/muchad/qaqg.git
25
+ %cd qaqg/
26
  ```
27
+
28
+ ## Usage 🚀
29
+ ### Question Answering
30
+
31
+ [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/muchad/qaqg/blob/main/idT5_Question_Answering.ipynb)
32
+
33
+ ```
34
+ from pipeline_qa import pipeline #pipeline_qa.py script in the cloned repo
35
+ qa = pipeline()
36
+
37
+ #sample
38
+ qa({"context":"Raja Purnawarman mulai memerintah Kerajaan Tarumanegara pada tahun 395 M.","question":"Siapa pemimpin Kerajaan Tarumanegara?"})
39
+
40
+ #output
41
+ => Raja Purnawarman
42
+ ```