From a4b4e716ed14ddc7b7c6e055a18b63f1883b34d2 Mon Sep 17 00:00:00 2001 From: Guanghua Yu <742925032@qq.com> Date: Thu, 19 Nov 2020 18:15:35 +0800 Subject: [PATCH] set deploy python path (#1724) --- 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 99d3b3f44..ec2ab48da 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