|
@@ -25,15 +25,15 @@ LOGGING = logging.getLogger('info')
|
|
|
CLOUD_BASED_AI_URL = '34.192.147.108:8001'
|
|
|
MODEL_NAME = 'AI_5obj_pdcpv_detect_yolov5_pipeline'
|
|
|
# 建立长连接
|
|
|
-ai_connect = None # AiEngine(url=CLOUD_BASED_AI_URL)
|
|
|
+ai_connect = AiEngine(url=CLOUD_BASED_AI_URL)
|
|
|
HEALTH = False
|
|
|
-# # 检查连通性、推理服务器状态
|
|
|
-# if ai_connect.health:
|
|
|
-# HEALTH = True
|
|
|
-# print('健康状况通过')
|
|
|
-# # 设定模型
|
|
|
-# if ai_connect.set_model(MODEL_NAME):
|
|
|
-# print('设置模型通过')
|
|
|
+# 检查连通性、推理服务器状态
|
|
|
+if ai_connect.health:
|
|
|
+ HEALTH = True
|
|
|
+ print('健康状况通过')
|
|
|
+# 设定模型
|
|
|
+if ai_connect.set_model(MODEL_NAME):
|
|
|
+ print('设置模型通过')
|
|
|
|
|
|
|
|
|
class AiView(View):
|