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

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +4 -4
README.md CHANGED
@@ -36,15 +36,15 @@ datasets:
36
  ### Usage
37
 
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
  ```
46
 
47
- You can use it using `haystack` as follows:
48
 
49
  ```
50
  from haystack.nodes import DensePassageRetriever
 
36
  ### Usage
37
 
38
  ```python
39
+ from transformers import DPRQuestionEncoder, DPRQuestionEncoderTokenizer
40
 
41
+ tokenizer = DPRQuestionEncoderTokenizer.from_pretrained('firqaaa/indo-dpr-question_encoder-single-squad-base')
42
+ model = DPRQuestionEncoder.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
  ```
46
 
47
+ We can use it using `haystack` as follows:
48
 
49
  ```
50
  from haystack.nodes import DensePassageRetriever