ZhangCheng commited on
Commit
d7b60d5
1 Parent(s): ea2508b

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +2 -2
README.md CHANGED
@@ -41,12 +41,12 @@ class QuestionGeneration:
41
  )
42
  input_ids = encoding['input_ids'].to(self.device)
43
  attention_mask = encoding['attention_mask'].to(self.device)
44
- beam_outputs = self.model.generate(
45
  input_ids = input_ids,
46
  attention_mask = attention_mask
47
  )
48
  question = self.tokenizer.decode(
49
- beam_outputs[0],
50
  skip_special_tokens = True,
51
  clean_up_tokenization_spaces = True
52
  )
 
41
  )
42
  input_ids = encoding['input_ids'].to(self.device)
43
  attention_mask = encoding['attention_mask'].to(self.device)
44
+ outputs = self.model.generate(
45
  input_ids = input_ids,
46
  attention_mask = attention_mask
47
  )
48
  question = self.tokenizer.decode(
49
+ outputs[0],
50
  skip_special_tokens = True,
51
  clean_up_tokenization_spaces = True
52
  )