Skip to content

Commit

Permalink
embed slowly
Browse files Browse the repository at this point in the history
  • Loading branch information
JosuaKrause committed Aug 27, 2024
1 parent a7efc37 commit 46208ac
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions app/system/autotag/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -500,10 +500,13 @@ def get_embeds() -> tuple[list[str], np.ndarray, dict]:
with db.get_session() as session:
keywords = sorted(get_keywords(session, tag_group))
cluster_args = get_tag_group_cluster_args(session, tag_group)
all_embeds = get_text_results_immediate(
keywords,
graph_profile=articles_graph,
output_sample=[1.0])
all_embeds: list[list[float] | None] = []
for keyword in keywords:
cur_embeds = get_text_results_immediate(
[keyword],
graph_profile=articles_graph,
output_sample=[1.0])
all_embeds.extend(cur_embeds)
final_kw: list[str] = []
embeds: list[list[float]] = []
for keyword, embed in zip(keywords, all_embeds):
Expand Down

0 comments on commit 46208ac

Please sign in to comment.