Commit 65c2f293 authored by 赵威's avatar 赵威

save result

parent 3bd1ac93
......@@ -9,6 +9,7 @@ import numpy as np
from utils.es import es_query
from utils.images import face_to_vec, url_to_ndarray
from utils.cache import redis_client3
def save_diary_image_info(save_file, face_to_vec_f):
......@@ -211,6 +212,9 @@ def main():
key = random.choice(list(res_dict.keys()))
print(res_dict[key])
redis_key = "doris:diary:face_similary"
redis_client3.hmset(redis_key, res_dict)
if __name__ == "__main__":
begin_time = time.time()
......
import redis
redis_client = redis.StrictRedis.from_url("redis://:ReDis!GmTx*0aN6@172.16.40.133:6379")
redis_client2 = redis.StrictRedis.from_url("redis://:ReDis!GmTx*0aN9@172.16.40.173:6379")
redis_client3 = redis.StrictRedis.from_url("redis://:ReDis!GmTx*0aN12@172.16.40.164:6379")
redis_client4 = redis.StrictRedis.from_url("redis://:XfkMCCdWDIU%ls$h@172.16.50.145:6379")
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