Browse Source

score_list接口

罗俊辉 11 tháng trước cách đây
mục cha
commit
693d2122fe
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      alg_app.py

+ 1 - 1
alg_app.py

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