浏览代码

nlp接口

罗俊辉 9 月之前
父节点
当前提交
f18ace5751
共有 2 个文件被更改,包括 2 次插入1 次删除
  1. 1 0
      alg_app.py
  2. 1 1
      test/nlp_dev.py

+ 1 - 0
alg_app.py

@@ -17,6 +17,7 @@ async def init():
     """
     await AsyncMySQL.init_pool()
     model = BertSimilarity(model_name_or_path="BAAI/bge-large-zh-v1.5")
+    print("模型加载成功")
     app_routes = AlgRoutes(AsyncMySQL, model)
     app.register_blueprint(app_routes)
 

+ 1 - 1
test/nlp_dev.py

@@ -48,7 +48,7 @@ body5 = {
 headers = {"Content-Type": "application/json"}
 
 a = time.time()
-response = requests.post(url=url, headers=headers, json=body5)
+response = requests.post(url=url, headers=headers, json=body1)
 b = time.time()
 print(json.dumps(response.json(), ensure_ascii=False, indent=4))
 print(b - a)