Trent
Multi model select and local model loading
a41bdbc
raw
history blame
312 Bytes
import streamlit as st
from sentence_transformers import SentenceTransformer
from .config import MODELS_ID
@st.cache(allow_output_mutation=True)
def load_model(model_name):
assert model_name in MODELS_ID.keys()
# Lazy downloading
model = SentenceTransformer(MODELS_ID[model_name])
return model