radames commited on
Commit
adf1024
1 Parent(s): 1d7d54e

Update pipeline.py

Browse files
Files changed (1) hide show
  1. 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.model_path = os.path.join(path, '.')
14
- self.tokenizer = AutoTokenizer.from_pretrained(self.model_path)
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