| import json | |
| import numpy as np | |
| from sentence_transformers import SentenceTransformer | |
| print("Loading embedding model from HuggingFace...") | |
| embedding_model = SentenceTransformer("all-MiniLM-L6-v2") | |
| print("Loading cluster data...") | |
| with open("models/cluster_data.json") as f: | |
| data = json.load(f) | |
| core_samples = np.array(data["core_samples"]) | |
| labels = np.array(data["labels"]) | |
| eps = data["eps"] | |
| print("Models loaded successfully.") |