The `paddlepaddle` package is used in this example, you may need to download the corresponding package(`pip install paddlepaddle`).
The `paddlepaddle` package is used in this example, you may need to download the corresponding package(`pip install paddlepaddle`).
[python encrypt.py](./encrypt.py)
[//file]:#encrypt.py
``` python
defserving_encryption():
inference_model_to_serving(
dirname="./uci_housing_model",
params_filename=None,
serving_server="encrypt_server",
serving_client="encrypt_client",
encryption=True)
```
```
python encrypt.py
dirname is the folder path where the model is located. If the parameter is discrete, it is unnecessary to specify params_filename, else you need to set params_filename='__params__'.
```
The key is stored in the `key` file, and the encrypted model file and server-side configuration file are stored in the `encrypt_server` directory.
The key is stored in the `key` file, and the encrypted model file and server-side configuration file are stored in the `encrypt_server` directory.
client-side configuration file are stored in the `encrypt_client` directory.
client-side configuration file are stored in the `encrypt_client` directory.