File tree 1 file changed +6
-2
lines changed
slm/model_zoo/uie/deploy/python
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 23
23
import six
24
24
25
25
from paddlenlp .transformers import AutoTokenizer
26
+ from paddlenlp .utils .env import (
27
+ PADDLE_INFERENCE_MODEL_SUFFIX ,
28
+ PADDLE_INFERENCE_WEIGHTS_SUFFIX ,
29
+ )
26
30
from paddlenlp .utils .tools import get_bool_ids_greater_than , get_span
27
31
28
32
@@ -85,8 +89,8 @@ def __init__(self, args):
85
89
86
90
def create_fd_runtime (self , args ):
87
91
option = fd .RuntimeOption ()
88
- model_path = os .path .join (args .model_dir , args .model_prefix + ".pdmodel " )
89
- params_path = os .path .join (args .model_dir , args .model_prefix + ".pdiparams " )
92
+ model_path = os .path .join (args .model_dir , args .model_prefix + f" { PADDLE_INFERENCE_MODEL_SUFFIX } " )
93
+ params_path = os .path .join (args .model_dir , args .model_prefix + f" { PADDLE_INFERENCE_WEIGHTS_SUFFIX } " )
90
94
option .set_model_path (model_path , params_path )
91
95
# Set device
92
96
if args .device == "cpu" :
You can’t perform that action at this time.
0 commit comments