File tree 1 file changed +7
-3
lines changed
slm/pipelines/pipelines/nodes/document
1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 29
29
sort_res ,
30
30
)
31
31
from paddlenlp .transformers import AutoTokenizer
32
- from paddlenlp .utils .env import PPNLP_HOME
32
+ from paddlenlp .utils .env import (
33
+ PADDLE_INFERENCE_MODEL_SUFFIX ,
34
+ PADDLE_INFERENCE_WEIGHTS_SUFFIX ,
35
+ PPNLP_HOME ,
36
+ )
33
37
34
38
logger = logging .getLogger (__name__ )
35
39
@@ -94,8 +98,8 @@ def __init__(
94
98
95
99
def _get_inference_model (self ):
96
100
inference_model_path = os .path .join (self ._task_path , "static" , "inference" )
97
- self ._static_model_file = inference_model_path + ".pdmodel "
98
- self ._static_params_file = inference_model_path + ".pdiparams "
101
+ self ._static_model_file = inference_model_path + f" { PADDLE_INFERENCE_MODEL_SUFFIX } "
102
+ self ._static_params_file = inference_model_path + f" { PADDLE_INFERENCE_WEIGHTS_SUFFIX } "
99
103
self ._config = paddle .inference .Config (self ._static_model_file , self ._static_params_file )
100
104
self ._prepare_static_mode ()
101
105
You can’t perform that action at this time.
0 commit comments