修复代码
This commit is contained in:
12
main.py
12
main.py
@@ -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():
|
||||
|
||||
Reference in New Issue
Block a user