File size: 436 Bytes
4c55ce6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | 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.") |