firqaaa commited on
Commit
79036e0
1 Parent(s): f806aa6

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +4 -4
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-ctx_encoder-single-squad-base')
42
- model = DPRContextEncoder.from_pretrained('firqaaa/indo-dpr-ctx_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,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-ctx_encoder-single-squad-base",
55
- passage_embedding_model="firqaaa/indo-dpr-ctx_encoder-single-squad-base",
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,