|
@@ -28,17 +28,17 @@ def process_file(file_path):
|
|
|
vid, vec = sample_values
|
|
|
result.append({
|
|
|
"vid":vid,
|
|
|
- "vec":vec
|
|
|
+ "vec":json.loads(vec)
|
|
|
})
|
|
|
else :
|
|
|
+
|
|
|
print(f"{sample_values}")
|
|
|
return result
|
|
|
|
|
|
-def write_results(results, output_file):
|
|
|
+def write_results(data, output_file):
|
|
|
"""将结果写入文件"""
|
|
|
with open(output_file, 'w') as json_file:
|
|
|
- for s in results:
|
|
|
- json_file.write(s + "\n")
|
|
|
+ json_file.write(data)
|
|
|
|
|
|
def thread_task(name, file_list):
|
|
|
"""线程任务"""
|