From ce745ffc737583489a610e218a7f9f117b4b1bee Mon Sep 17 00:00:00 2001 From: "DTC@Cyberbolt" Date: Tue, 2 Mar 2021 10:41:35 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=8D=A2=E8=BF=9C=E7=A8=8B=E4=B8=8B?= =?UTF-8?q?=E8=BD=BD=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Cemotion-apple/cemotion/app.py | 24 ++++++++++++------------ Cemotion-apple/setup.py | 2 +- Cemotion/cemotion/app.py | 24 ++++++++++++------------ Cemotion/setup.py | 2 +- 4 files changed, 26 insertions(+), 26 deletions(-) diff --git a/Cemotion-apple/cemotion/app.py b/Cemotion-apple/cemotion/app.py index 5df4502..d8a16fd 100644 --- a/Cemotion-apple/cemotion/app.py +++ b/Cemotion-apple/cemotion/app.py @@ -35,19 +35,19 @@ def __init__(self): dictionary_path = current_path + '/models/requirements/big_Chinese_Words_Map.dict' #检测所需文件是否存在,判断是否下载 #若主链接无法使用,使用备用链接 - try: - check_env('https://onedrive.gimhoy.com/1drv/aHR0cHM6Ly8xZHJ2Lm1zL3UvcyFBaVdOR2ZlUEx6NWszUVJVdGhaQWZJNVROVTlSP2U9b2pJOEtF.dict', - dictionary_path) - except: - check_env('https://www.cyberlight.xyz/static/file/cemotion/big_Chinese_Words_Map.dict', - dictionary_path) + # try: + # check_env('https://onedrive.gimhoy.com/1drv/aHR0cHM6Ly8xZHJ2Lm1zL3UvcyFBaVdOR2ZlUEx6NWszUVJVdGhaQWZJNVROVTlSP2U9b2pJOEtF.dict', + # dictionary_path) + # except: + check_env('https://www.cyberlight.xyz/static/file/cemotion/big_Chinese_Words_Map.dict', + dictionary_path) #若主链接无法使用,使用备用链接 - try: - check_env('https://onedrive.gimhoy.com/1drv/aHR0cHM6Ly8xZHJ2Lm1zL3UvcyFBaVdOR2ZlUEx6NWttbEpoTDU0UFRhUmZSbzhNP2U9czhWcVE3.h5', - model_path) - except: - check_env('https://www.cyberlight.xyz/static/file/cemotion/rnn_emotion_1.0.h5', - model_path) + # try: + # check_env('https://onedrive.gimhoy.com/1drv/aHR0cHM6Ly8xZHJ2Lm1zL3UvcyFBaVdOR2ZlUEx6NWttbEpoTDU0UFRhUmZSbzhNP2U9czhWcVE3.h5', + # model_path) + # except: + check_env('https://www.cyberlight.xyz/static/file/cemotion/rnn_emotion_1.0.h5', + model_path) #加载rnn模型 self.__rnn = tf.keras.models.load_model(model_path) #加载数据集实例 diff --git a/Cemotion-apple/setup.py b/Cemotion-apple/setup.py index cad85e7..32611cb 100644 --- a/Cemotion-apple/setup.py +++ b/Cemotion-apple/setup.py @@ -6,7 +6,7 @@ setuptools.setup( name="Cemotion-apple", - version="0.3.2", + version="0.3.3", author="Cyberbolt", author_email="735245473@qq.com", description="基于NLP的中文情感倾向分析库", diff --git a/Cemotion/cemotion/app.py b/Cemotion/cemotion/app.py index ec63250..8c7509e 100644 --- a/Cemotion/cemotion/app.py +++ b/Cemotion/cemotion/app.py @@ -35,19 +35,19 @@ def __init__(self): dictionary_path = current_path + '/models/requirements/big_Chinese_Words_Map.dict' #检测所需文件是否存在,判断是否下载 #若主链接无法使用,使用备用链接 - try: - check_env('https://onedrive.gimhoy.com/1drv/aHR0cHM6Ly8xZHJ2Lm1zL3UvcyFBaVdOR2ZlUEx6NWszUVJVdGhaQWZJNVROVTlSP2U9b2pJOEtF.dict', - dictionary_path) - except: - check_env('https://www.cyberlight.xyz/static/file/cemotion/big_Chinese_Words_Map.dict', - dictionary_path) + # try: + # check_env('https://onedrive.gimhoy.com/1drv/aHR0cHM6Ly8xZHJ2Lm1zL3UvcyFBaVdOR2ZlUEx6NWszUVJVdGhaQWZJNVROVTlSP2U9b2pJOEtF.dict', + # dictionary_path) + # except: + check_env('https://www.cyberlight.xyz/static/file/cemotion/big_Chinese_Words_Map.dict', + dictionary_path) #若主链接无法使用,使用备用链接 - try: - check_env('https://onedrive.gimhoy.com/1drv/aHR0cHM6Ly8xZHJ2Lm1zL3UvcyFBaVdOR2ZlUEx6NWszVndYZ2I3SmJQdDR6b0pqP2U9UjlzZmRR.h5', - model_path) - except: - check_env('https://www.cyberlight.xyz/static/file/cemotion/rnn_emotion_x86_1.0.h5', - model_path) + # try: + # check_env('https://onedrive.gimhoy.com/1drv/aHR0cHM6Ly8xZHJ2Lm1zL3UvcyFBaVdOR2ZlUEx6NWszVndYZ2I3SmJQdDR6b0pqP2U9UjlzZmRR.h5', + # model_path) + # except: + check_env('https://www.cyberlight.xyz/static/file/cemotion/rnn_emotion_x86_1.0.h5', + model_path) #加载rnn模型 self.__rnn = tf.keras.models.load_model(model_path) #加载数据集实例 diff --git a/Cemotion/setup.py b/Cemotion/setup.py index b2754ab..2ba0fb1 100644 --- a/Cemotion/setup.py +++ b/Cemotion/setup.py @@ -6,7 +6,7 @@ setuptools.setup( name="Cemotion", - version="0.3.2", + version="0.3.3", author="Cyberbolt", author_email="735245473@qq.com", description="基于NLP的中文情感倾向分析库",