Update pipeline.py
Browse files- pipeline.py +2 -3
pipeline.py
CHANGED
@@ -10,9 +10,8 @@ device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
|
10 |
class PreTrainedPipeline():
|
11 |
def __init__(self, path=""):
|
12 |
# load the optimized model
|
13 |
-
self.
|
14 |
-
self.
|
15 |
-
self.model = AutoModel.from_pretrained(self.model_path)
|
16 |
self.model.eval()
|
17 |
self.model = self.model.to(device)
|
18 |
|
|
|
10 |
class PreTrainedPipeline():
|
11 |
def __init__(self, path=""):
|
12 |
# load the optimized model
|
13 |
+
self.tokenizer = AutoTokenizer.from_pretrained(path)
|
14 |
+
self.model = AutoModel.from_pretrained(path)
|
|
|
15 |
self.model.eval()
|
16 |
self.model = self.model.to(device)
|
17 |
|