Fix AutoTokenizer
Browse files- 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 =
|
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 |
|