Update README.md
Browse files
README.md
CHANGED
@@ -38,8 +38,8 @@ datasets:
|
|
38 |
```python
|
39 |
from transformers import DPRContextEncoder, DPRContextEncoderTokenizer
|
40 |
|
41 |
-
tokenizer = DPRContextEncoderTokenizer.from_pretrained('firqaaa/indo-dpr-
|
42 |
-
model = DPRContextEncoder.from_pretrained('firqaaa/indo-dpr-
|
43 |
input_ids = tokenizer("Ibukota Indonesia terletak dimana?", return_tensors='pt')["input_ids"]
|
44 |
embeddings = model(input_ids).pooler_output
|
45 |
```
|
@@ -51,8 +51,8 @@ from haystack.nodes import DensePassageRetriever
|
|
51 |
from haystack.document_stores import InMemoryDocumentStore
|
52 |
|
53 |
retriever = DensePassageRetriever(document_store=InMemoryDocumentStore(),
|
54 |
-
query_embedding_model="firqaaa/indo-dpr-
|
55 |
-
passage_embedding_model="firqaaa/indo-dpr-
|
56 |
max_seq_len_query=64,
|
57 |
max_seq_len_passage=256,
|
58 |
batch_size=16,
|
|
|
38 |
```python
|
39 |
from transformers import DPRContextEncoder, DPRContextEncoderTokenizer
|
40 |
|
41 |
+
tokenizer = DPRContextEncoderTokenizer.from_pretrained('firqaaa/indo-dpr-question_encoder-single-squad-base')
|
42 |
+
model = DPRContextEncoder.from_pretrained('firqaaa/indo-dpr-question_encoder-single-squad-base')
|
43 |
input_ids = tokenizer("Ibukota Indonesia terletak dimana?", return_tensors='pt')["input_ids"]
|
44 |
embeddings = model(input_ids).pooler_output
|
45 |
```
|
|
|
51 |
from haystack.document_stores import InMemoryDocumentStore
|
52 |
|
53 |
retriever = DensePassageRetriever(document_store=InMemoryDocumentStore(),
|
54 |
+
query_embedding_model="firqaaa/indo-dpr-question_encoder-single-squad-base",
|
55 |
+
passage_embedding_model="firqaaa/indo-dpr-question_encoder-single-squad-base",
|
56 |
max_seq_len_query=64,
|
57 |
max_seq_len_passage=256,
|
58 |
batch_size=16,
|