修复代码

This commit is contained in:
2026-02-03 16:49:00 +08:00
parent 06bcaad8d4
commit fed16f04e1
2 changed files with 55 additions and 3 deletions

12
main.py
View File

@@ -1,10 +1,18 @@
from feature_extraction import process_single
from inference import engine
from inference import InferenceEngine
from services.mongo import voice_collection
import json,uuid
from fastapi import FastAPI
from pydantic import BaseModel
backbone_dir = "Qwen3-1.7B"
ckpt_path = "best_ckpt.pth"
device = "cuda"
engine = InferenceEngine(backbone_dir, ckpt_path, device)
async def get_customer_record():
cursor = voice_collection.find({
"tag": "20分钟通话",
@@ -14,7 +22,7 @@ async def get_customer_record():
}
}
}).sort([('_id', -1)]).limit(24)
return await cursor.to_list(length=4)
return await cursor.to_list(length=1)
async def main():