Views
No views yet
merged_embeddings.npy — Float32 matrix of movie embeddings. Shape is recorded in merged_shape.txt (rows × dims).merged_shape.txt — Two integers separated by a space or comma indicating the embedding matrix shape, e.g. 200000 384.index.faiss — FAISS index built from merged_embeddings.npy for fast nearest‑neighbor queries.movies.csv, id→row maps) referenced by your Recommender class.BASE_DIR = os.path.dirname(__file__)
DATA_DIR = os.path.join(BASE_DIR, "data")merged_embeddings.npy (Float32, contiguous).merged_shape.txt.IndexFlatIP or IndexIVFFlat) and write to index.faiss.1import faiss, numpy as np
2X = np.load('merged_embeddings.npy').astype('float32')
3index = faiss.IndexFlatIP(X.shape[1])
4faiss.normalize_L2(X)
5index.add(X)
6faiss.write_index(index, 'index.faiss')dtype=float32; mismatched dims cause runtime errors.SHA256SUMS) for CI/CD verification.