Commit 32da5ed5 authored by 赵威's avatar 赵威

get diary info

parent b0742984
......@@ -6,8 +6,8 @@ import dlib
import faiss
import numpy as np
from utils.images import face_to_vec, url_to_ndarray
from utils.es import es_query
from utils.images import face_to_vec, url_to_ndarray
def save_diary_image_info(file):
......@@ -42,7 +42,12 @@ def save_diary_image_info(file):
step = 100
for i in range(0, 500000, step):
res_dict = es_query("diary", q, 0, step)
print(res_dict)
for item in res_dict["hits"]:
diary_id = item["_source"]["id"]
before_cover_url = item["_source"]["before_cover_url"] + "-w"
after_cover_url = item["_source"]["after_cover_url"] + "-w"
print(diary_id + " " + after_cover_url)
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