File size: 726 Bytes
87296cd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# D:\jan-contract\utils\model_loaders.py

import streamlit as st
# Import from our new backend-safe loader
from core_utils.core_model_loaders import load_embedding_model, load_groq_llm, load_gemini_llm

@st.cache_resource
def get_embedding_model():
    """Loads and caches the embedding model for the Streamlit app."""
    with st.spinner("Initializing embedding model (this is a one-time download)..."):
        model = load_embedding_model()
    return model

@st.cache_resource
def get_groq_llm():
    """Loads and caches the Groq LLM for the Streamlit app."""
    return load_groq_llm()

@st.cache_resource
def get_gemini_llm():
    """Loads and caches the Gemini LLM for the Streamlit app."""
    return load_gemini_llm()