tkharisov7 commited on
Commit
6618229
·
1 Parent(s): 129ef5e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -21,8 +21,8 @@ def get_pipeline():
21
  def preprocess(self, inputs):
22
  question, essay = inputs
23
  encoding = self.tokenizer(question, essay, return_tensors='pt', padding='max_length', truncation=True, max_length=512)
24
- input_ids = encoding['input_ids'].to(device)
25
- attention_mask = encoding['attention_mask'].to(device)
26
  return {'input_ids': input_ids, 'attention_mask': attention_mask}
27
 
28
  def _forward(self, input):
 
21
  def preprocess(self, inputs):
22
  question, essay = inputs
23
  encoding = self.tokenizer(question, essay, return_tensors='pt', padding='max_length', truncation=True, max_length=512)
24
+ input_ids = encoding['input_ids']
25
+ attention_mask = encoding['attention_mask']
26
  return {'input_ids': input_ids, 'attention_mask': attention_mask}
27
 
28
  def _forward(self, input):