Update README.md
Browse files
README.md
CHANGED
@@ -45,7 +45,7 @@ if torch.cuda.is_available():
|
|
45 |
tokenizer = AutoTokenizer.from_pretrained("zstanjj/SlimPLM-Retrieval-Necessity-Judgment")
|
46 |
|
47 |
# run inference
|
48 |
-
input_ids = tokenizer.encode(question, return_tensors="pt")
|
49 |
len_input_ids = len(input_ids[0])
|
50 |
if torch.cuda.is_available():
|
51 |
input_ids = input_ids.cuda()
|
|
|
45 |
tokenizer = AutoTokenizer.from_pretrained("zstanjj/SlimPLM-Retrieval-Necessity-Judgment")
|
46 |
|
47 |
# run inference
|
48 |
+
input_ids = tokenizer.encode(prompt.format(question=question, answer=heuristic_answer), return_tensors="pt")
|
49 |
len_input_ids = len(input_ids[0])
|
50 |
if torch.cuda.is_available():
|
51 |
input_ids = input_ids.cuda()
|