From 9ce2b1dc67eb4537ef3d44fc36f67139c65c9eac Mon Sep 17 00:00:00 2001 From: shenyuhan Date: Mon, 4 Nov 2019 11:24:54 +0800 Subject: [PATCH] add single_app() --- paddlehub/serving/app_single.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/paddlehub/serving/app_single.py b/paddlehub/serving/app_single.py index 8c7d1a94..e333cdf8 100644 --- a/paddlehub/serving/app_single.py +++ b/paddlehub/serving/app_single.py @@ -60,6 +60,8 @@ def predict_lexical_analysis(module, input_text, extra=[]): user_dict = extra[0] results = predict_method( data=data, user_dict=user_dict, use_gpu=use_gpu) + for path in extra: + os.remove(path) except Exception as err: return {"result": "Please check data format!"} return results -- GitLab