Forráskód Böngészése

开启SageMaker AI

zhangdongming 2 éve
szülő
commit
3d27fe9c1d
1 módosított fájl, 8 hozzáadás és 8 törlés
  1. 8 8
      Controller/AiController.py

+ 8 - 8
Controller/AiController.py

@@ -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):