from sentence_transformers import SentenceTransformer # Load the pre-trained model once at startup model = SentenceTransformer('Alibaba-NLP/gte-base-en-v1.5', trust_remote_code=True)