Update README.md
Browse files
README.md
CHANGED
@@ -42,5 +42,30 @@ The model was trained on a Tesla T4 GPU and 12GB of RAM.
|
|
42 |
| **EM** | **51.61** |
|
43 |
| **F1** | **69.09** |
|
44 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
### Reference
|
46 |
<a id="1">[1]</a>Fajri Koto and Afshin Rahimi and Jey Han Lau and Timothy Baldwin. 2020. IndoLEM and IndoBERT: A Benchmark Dataset and Pre-trained Language Model for Indonesian NLP. Proceedings of the 28th COLING.
|
|
|
42 |
| **EM** | **51.61** |
|
43 |
| **F1** | **69.09** |
|
44 |
|
45 |
+
## Simple Usage
|
46 |
+
```py
|
47 |
+
from transformers import pipeline
|
48 |
+
|
49 |
+
qa_pipeline = pipeline(
|
50 |
+
"question-answering",
|
51 |
+
model="Rifky/Indobert-QA",
|
52 |
+
tokenizer="Rifky/Indobert-QA"
|
53 |
+
)
|
54 |
+
|
55 |
+
qa_pipeline({
|
56 |
+
'context': """Pangeran Harya Dipanegara (atau biasa dikenal dengan nama Pangeran Diponegoro, lahir di Ngayogyakarta Hadiningrat, 11 November 1785 – meninggal di Makassar, Hindia Belanda, 8 Januari 1855 pada umur 69 tahun) adalah salah seorang pahlawan nasional Republik Indonesia, yang memimpin Perang Diponegoro atau Perang Jawa selama periode tahun 1825 hingga 1830 melawan pemerintah Hindia Belanda. Sejarah mencatat, Perang Diponegoro atau Perang Jawa dikenal sebagai perang yang menelan korban terbanyak dalam sejarah Indonesia, yakni 8.000 korban serdadu Hindia Belanda, 7.000 pribumi, dan 200 ribu orang Jawa serta kerugian materi 25 juta Gulden.""",
|
57 |
+
'question': "kapan pangeran diponegoro lahir?"
|
58 |
+
})
|
59 |
+
```
|
60 |
+
*output:*
|
61 |
+
```py
|
62 |
+
{
|
63 |
+
'answer': '11 November 1785',
|
64 |
+
'end': 131,
|
65 |
+
'score': 0.9272009134292603,
|
66 |
+
'start': 115
|
67 |
+
}
|
68 |
+
```
|
69 |
+
|
70 |
### Reference
|
71 |
<a id="1">[1]</a>Fajri Koto and Afshin Rahimi and Jey Han Lau and Timothy Baldwin. 2020. IndoLEM and IndoBERT: A Benchmark Dataset and Pre-trained Language Model for Indonesian NLP. Proceedings of the 28th COLING.
|