zstanjj commited on
Commit
9aecf67
1 Parent(s): 920429b

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +1 -1
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()