Commit
·
45fd030
1
Parent(s):
87f587a
Update README.md
Browse files
README.md
CHANGED
@@ -34,8 +34,8 @@ documents = [
|
|
34 |
|
35 |
question = "什么是怀孕最显著也是最早的信号?"
|
36 |
|
37 |
-
question_input = tokenizer(
|
38 |
-
docs_input = tokenizer(documents
|
39 |
# document input shape should be [batch_size, num_docs, seq_len]
|
40 |
# so if only input one sample of documents, add one dim by unsqueeze(0)
|
41 |
output = model(
|
|
|
34 |
|
35 |
question = "什么是怀孕最显著也是最早的信号?"
|
36 |
|
37 |
+
question_input = tokenizer(question, padding=True, return_tensors="pt")
|
38 |
+
docs_input = tokenizer(documents, padding=True, return_tensors="pt")
|
39 |
# document input shape should be [batch_size, num_docs, seq_len]
|
40 |
# so if only input one sample of documents, add one dim by unsqueeze(0)
|
41 |
output = model(
|