rtl-log-intelligence-api / app /model_loader.py
abhinavvvvv's picture
Initial commit with Git LFS
4c55ce6
raw
history blame contribute delete
436 Bytes
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.")