MCPcopy
hub / github.com/bhaskatripathi/pdfGPT / get_text_embedding

Method get_text_embedding

api.py:90–97  ·  view source on GitHub ↗
(self, texts, batch=1000)

Source from the content-addressed store, hash-verified

88 return neighbors
89
90 def get_text_embedding(self, texts, batch=1000):
91 embeddings = []
92 for i in range(0, len(texts), batch):
93 text_batch = texts[i : (i + batch)]
94 emb_batch = self.use(text_batch)
95 embeddings.append(emb_batch)
96 embeddings = np.vstack(embeddings)
97 return embeddings
98
99
100def load_recommender(path, start_page=1):

Callers 1

fitMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected