Commit 911a2f60 authored by 赵威's avatar 赵威

add limit

parent 723d710f
......@@ -42,9 +42,10 @@ if __name__ == "__main__":
count = 0
embedding_dict = {}
for item in get_answer_info_from_es(["id", "answer", "content_level"]):
if count < 1000:
count += 1
print(count)
id = int(item["_id"])
print(count, id)
content = item["_source"]["answer"]
content_level = str(item["_source"]["content_level"])
# print(id, content_level, content)
......
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