24 lines
625 B
Python
24 lines
625 B
Python
from feature_extraction import process_single
|
|
from inference import engine
|
|
from services.mongo import voice_collection
|
|
|
|
|
|
async def get_customer_record():
|
|
cursor = voice_collection.find({
|
|
"tag": "20分钟通话",
|
|
"matched_contacts": {
|
|
"$elemMatch": {
|
|
"wecom_id": {"$exists": True, "$ne": ""}
|
|
}
|
|
}
|
|
}).sort([('_id', -1)]).limit(24)
|
|
return await cursor.to_list(length=24)
|
|
|
|
async def main():
|
|
records = await get_customer_record()
|
|
for record in records:
|
|
print(record)
|
|
|
|
if __name__ == "__main__":
|
|
import asyncio
|
|
asyncio.run(main()) |