|
@@ -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)
|
|
@@ -32,4 +32,4 @@ async def close_db():
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
- app.run(debug=True, host="0.0.0.0", port=6060)
|
|
|
+ app.run()
|