Cooking_Tutor / models /warmup.py
LiamKhoaLe's picture
Init commit
21446aa
raw
history blame
311 Bytes
from sentence_transformers import SentenceTransformer
import torch
print("🚀 Warming up model...")
embedding_model = SentenceTransformer("/app/model_cache", device="cpu")
# embedding_model = embedding_model.half() # Reduce memory
embedding_model.to(torch.device("cpu"))
print("✅ Model warm-up complete!")