DhaneshV commited on
Commit
211926f
·
1 Parent(s): cf6c975

Update testing.py

Browse files
Files changed (1) hide show
  1. testing.py +2 -7
testing.py CHANGED
@@ -2,13 +2,8 @@ from transformers import Pipeline
2
  import torch
3
 
4
  class DeclarativePipeline(Pipeline):
5
- def _sanitize_parameters(self, **kwargs):
6
- preprocess_kwargs = {}
7
- if "answer" in kwargs:
8
- preprocess_kwargs["answer"] = kwargs["answer"]
9
- if "question" in kwargs:
10
- preprocess_kwargs["question"] = kwargs["question"]
11
- return preprocess_kwargs, {}, {}
12
 
13
  def preprocess(self, inputs, question, answer):
14
  return self.tokenizer(
 
2
  import torch
3
 
4
  class DeclarativePipeline(Pipeline):
5
+ def _sanitize_parameters(self, *args):
6
+ return args, {}, {}
 
 
 
 
 
7
 
8
  def preprocess(self, inputs, question, answer):
9
  return self.tokenizer(