| # -*- coding: utf-8 -*- | |
| """ | |
| Created on Fri Jul 3 15:48:54 2026 | |
| @author: ALBERT | |
| """ | |
| from sentence_transformers import SentenceTransformer | |
| import numpy as np | |
| model = SentenceTransformer("all-MiniLM-L6-v2") | |
| def compute_embeddings(chunks): | |
| embeddings = model.encode(chunks) | |
| return np.array(embeddings).astype("float32") |