Jeney commited on
Commit
176c89c
1 Parent(s): 253f1f9

Fix AutoTokenizer

Browse files
Files changed (1) hide show
  1. handler.py +1 -1
handler.py CHANGED
@@ -5,7 +5,7 @@ from transformers import ViltProcessor, ViltForQuestionAnswering
5
  class EndpointHandler:
6
  def __init__(self, path=""):
7
  # load model and processor from path
8
- self.processor = AutoTokenizer.from_pretrained(path)
9
  self.model = ViltForQuestionAnswering.from_pretrained(path)
10
  self.device = "cuda" if torch.cuda.is_available() else "cpu"
11
 
 
5
  class EndpointHandler:
6
  def __init__(self, path=""):
7
  # load model and processor from path
8
+ self.processor = ViltProcessor.from_pretrained(path)
9
  self.model = ViltForQuestionAnswering.from_pretrained(path)
10
  self.device = "cuda" if torch.cuda.is_available() else "cpu"
11