Update pipeline.py
Browse files- pipeline.py +2 -3
pipeline.py
CHANGED
@@ -8,9 +8,8 @@ class PreTrainedPipeline():
|
|
8 |
# Preload all the elements you are going to need at inference.
|
9 |
# For instance your model, processors, tokenizer that might be needed.
|
10 |
# This function is only called once, so do all the heavy processing I/O here"""
|
11 |
-
self.
|
12 |
-
self.
|
13 |
-
self.tokenizer = AutoTokenizer.from_pretrained(self.model_name)
|
14 |
|
15 |
|
16 |
def __call__(self, inputs: str):
|
|
|
8 |
# Preload all the elements you are going to need at inference.
|
9 |
# For instance your model, processors, tokenizer that might be needed.
|
10 |
# This function is only called once, so do all the heavy processing I/O here"""
|
11 |
+
self.model = AutoModelForSeq2SeqLM.from_pretrained(path)
|
12 |
+
self.tokenizer = AutoTokenizer.from_pretrained(path)
|
|
|
13 |
|
14 |
|
15 |
def __call__(self, inputs: str):
|