Skip to content

Commit

Permalink
changed ambiguous variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
dillonalaird committed Feb 18, 2024
1 parent c08a982 commit bcc376e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lmm_tools/data/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ def search(self, query: str, top_k: int = 10) -> list[dict]:
raise ValueError("Embedder not set yet")

query_embedding = self.emb.embed(query)
_, I = self.index.search(query_embedding.reshape(1, -1), top_k)
return self.df.iloc[I[0]].to_dict(orient="records")
_, idx = self.index.search(query_embedding.reshape(1, -1), top_k)
return self.df.iloc[idx[0]].to_dict(orient="records")

def save(self, path: str | Path) -> None:
path = Path(path)
Expand Down

0 comments on commit bcc376e

Please sign in to comment.