Commit 035306f6 authored by 赵威's avatar 赵威

get embeddings

parent d676abfe
......@@ -53,7 +53,10 @@ if __name__ == "__main__":
content = item["_source"]["answer"]
content_level = str(item["_source"]["content_level"])
level_dict[content_level].append(id)
try:
embedding_dict[id] = bc.encode([content]).tolist()[0]
except Exception as e:
pass
# redis_client_db.hmset("answer:level_dict", json.dumps(level_dict))
......
......@@ -26,7 +26,10 @@ if __name__ == "__main__":
content = item["_source"]["answer"]
content_level = str(item["_source"]["content_level"])
level_dict[content_level].append(id)
try:
embedding_dict[id] = bc.encode([content]).tolist()[0]
except Exception as e:
pass
# redis_client_db.hmset("diary:level_dict", json.dumps(level_dict))
......
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