Browse Source

set gui_mode to true when paddlepaddle>=2.0.0 and paddlehub>=2.0.1

FlyingQianMM 4 năm trước cách đây
mục cha
commit
2398deb9e1
2 tập tin đã thay đổi với 7 bổ sung14 xóa
  1. 3 2
      paddlex/__init__.py
  2. 4 12
      setup.py

+ 3 - 2
paddlex/__init__.py

@@ -14,8 +14,7 @@
 
 from __future__ import absolute_import
 
-__version__ = '1.3.6'
-gui_mode = True
+__version__ = '1.3.7'
 
 import os
 if 'FLAGS_eager_delete_tensor_gb' not in os.environ:
@@ -29,6 +28,7 @@ if "CUDA_VISIBLE_DEVICES" in os.environ:
 import paddle
 version = paddle.__version__.strip().split('.')
 if version[0] == '1':
+    gui_mode = True
     if version[1] != '8':
         raise Exception(
             'For running paddlex(v{}), Version of paddlepaddle should be greater than 1.8.3'.
@@ -39,6 +39,7 @@ if version[0] == '1':
 
 if hasattr(paddle, 'enable_static'):
     paddle.enable_static()
+    gui_mode = False
 
 from .utils.utils import get_environ_info
 from . import cv

+ 4 - 12
setup.py

@@ -19,7 +19,7 @@ long_description = "PaddlePaddle Entire Process Development Toolkit"
 
 setuptools.setup(
     name="paddlex",
-    version='1.3.6',
+    version='1.3.7',
     author="paddlex",
     author_email="paddlex@baidu.com",
     description=long_description,
@@ -38,17 +38,9 @@ setuptools.setup(
     include_data_files=True,
     setup_requires=['cython', 'numpy'],
     install_requires=[
-        "pycocotools;platform_system!='Windows'",
-        'pyyaml',
-        'colorama',
-        'tqdm',
-        'paddleslim==1.1.1',
-        'visualdl>=2.0.0',  #'paddlehub==1.8.2',
-        'shapely>=1.7.0',
-        'opencv-python',
-        'flask_cors',
-        'sklearn',
-        'psutil',
+        "pycocotools;platform_system!='Windows'", 'pyyaml', 'colorama', 'tqdm',
+        'paddleslim==1.1.1', 'visualdl>=2.0.0', 'paddlehub==2.0.1',
+        'shapely>=1.7.0', 'opencv-python', 'flask_cors', 'sklearn', 'psutil',
         'xlwt'
     ],
     classifiers=[