From 6ffa0c6cf29ccee195a396919a29da24f9322292 Mon Sep 17 00:00:00 2001 From: Guanghua Yu <742925032@qq.com> Date: Thu, 19 Nov 2020 18:15:16 +0800 Subject: [PATCH] set deploy python path (#1723) --- deploy/python/infer.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/deploy/python/infer.py b/deploy/python/infer.py index ab2e08aab..0ab948904 100644 --- a/deploy/python/infer.py +++ b/deploy/python/infer.py @@ -12,7 +12,16 @@ # See the License for the specific language governing permissions and # limitations under the License. -import os +from __future__ import absolute_import +from __future__ import division +from __future__ import print_function + +import os, sys +# add python path of PadleDetection to sys.path +parent_path = os.path.abspath(os.path.join(__file__, *(['..'] * 3))) +if parent_path not in sys.path: + sys.path.append(parent_path) + import argparse import time import yaml -- GitLab