Awlly's picture
changed file system to be more streamlined
eed5f5d
raw
history blame
506 Bytes
import streamlit as st
from sentence_transformers import SentenceTransformer
import faiss
import pandas as pd
@st.cache_data
def load_model():
model = SentenceTransformer('cointegrated/rubert-tiny2')
return model
@st.cache_data
def load_faiss_index():
index = faiss.read_index('data/faiss_index.index')
return index
@st.cache_data
def load_dataset():
data = pd.read_csv('data/cleaned_data.csv')
return data
model = load_model()
index = load_faiss_index()
data = load_dataset()