m3 commited on
Commit
857f94a
1 Parent(s): af0ce54

chore: change onnxruntime to 1.16

Browse files
Files changed (2) hide show
  1. pipeline.py +1 -1
  2. requirements.txt +4 -4
pipeline.py CHANGED
@@ -20,7 +20,7 @@ class ONNXBaseModel(PreTrainedModel):
20
  if base_path:
21
  model_path = base_path + '/' + config.model_path
22
  if os.path.exists(model_path):
23
- self.session = ort.InferenceSession(model_path)
24
 
25
  def forward(self, input=None, **kwargs):
26
  outs = self.session.run(None, {'input': input})
 
20
  if base_path:
21
  model_path = base_path + '/' + config.model_path
22
  if os.path.exists(model_path):
23
+ self.session = ort.InferenceSession(model_path, providers=['CPUExecutionProvider'])
24
 
25
  def forward(self, input=None, **kwargs):
26
  outs = self.session.run(None, {'input': input})
requirements.txt CHANGED
@@ -1,4 +1,4 @@
1
- transformers>=4.41.2
2
- torch>=2.3.1
3
- onnx>=1.16.1
4
- onnxruntime>=1.18.0
 
1
+ transformers
2
+ torch
3
+ onnx
4
+ onnxruntime==1.16.0