CoolFace
Apppublic

Awlly/TVShowRecommender

sourceHugging Faceupdated 3y agoView on Hugging Face
0likes
loader.py25 linesDownload Raw Back to functions
1import streamlit as st2from sentence_transformers import SentenceTransformer3import faiss4import pandas as pd5 6 7 8@st.cache_data9def load_model():10    model = SentenceTransformer('cointegrated/rubert-tiny2')11    return model12 13@st.cache_data14def load_faiss_index():15    index = faiss.read_index('data/faiss_index.index')16    return index17 18@st.cache_data19def load_dataset():20    data = pd.read_csv('data/cleaned_data.csv')21    return data22 23model = load_model()24index = load_faiss_index()25data = load_dataset()