Spaces:
Runtime error
Runtime error
tkharisov7
commited on
Commit
·
6618229
1
Parent(s):
129ef5e
Update app.py
Browse files
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']
|
25 |
-
attention_mask = encoding['attention_mask']
|
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):
|