Commit cf4db7d7 authored by 赵威's avatar 赵威

save result

parent 0c3c5865
......@@ -148,13 +148,14 @@ def save_diary_similarity(load_file, index_path, face_to_vec_f):
print("{} {}".format(count, id))
tup_res = get_similar_diary_ids_by_face_features(feature, index_path, face_to_vec_f)
if tup_res:
res_dict[id] = tup_res
res_dict[id] = json.dumps(tup_res)
print("done: " + str(len(res_dict)))
key = random.choice(list(res_dict.keys()))
print(res_dict[key])
redis_key = "doris:diary:face_similary"
redis_client3.hmset(redis_key, json.dumps(res_dict))
redis_client3.hmset(redis_key, res_dict)
def main():
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment