标注一下,这是一个可以启动的版本

This commit is contained in:
2025-04-17 16:25:44 +08:00
parent b0379e64c9
commit 434e1af3e8
9 changed files with 30 additions and 113 deletions

View File

@ -70,7 +70,7 @@ async def connect_redis(app: FastAPI, status: bool):
print("Redis 连接成功")
# 数据初始化
is_gpu = torch.cuda.is_available()
rd.set('is_gpu', str(is_gpu))
await rd.set('is_gpu', str(is_gpu))
else:
print("Redis 连接失败")
except AuthenticationError as e: