基于Transformer对文本进行向量搜索
import csv
from datetime import datetime
import numpy as np
import pandas as pd
import os
from pathlib import Path
from sentence_transformers import SentenceTransformer, CrossEncoder, util
from concurrent.futures import ThreadPoolExecutor, wait
import multiprocessing
# Query data from QE platform
def concurrency_encode_text(text_arr):
record_count = text_arr.size
task_count = int(record_count / thread_num) + 1
future_tasks = []
for index in range(threa
版权声明:
作者:zhangchen
链接:https://www.techfm.club/p/13528.html
来源:TechFM
文章版权归作者所有,未经允许请勿转载。
THE END
二维码
共有 0 条评论