Spaces:
Running
Running
File size: 309 Bytes
9f75635 |
1 2 3 4 5 6 7 8 9 |
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!")
|