Skip to content

Instantly share code, notes, and snippets.

@srang992
Created April 17, 2022 03:49
Show Gist options
  • Save srang992/3519cdf9871ba850e7082f3da3d9dabc to your computer and use it in GitHub Desktop.
Save srang992/3519cdf9871ba850e7082f3da3d9dabc to your computer and use it in GitHub Desktop.
file load
@st.cache(persist=True, show_spinner=False, suppress_st_warning=True)
def load_data():
"""
load and cache data
:return: tfidf data
"""
tfidf_data = pd.read_csv("data/tfidf_data.csv", index_col=0)
return tfidf_data
tfidf = load_data()
with open("data/movie_list.pickle", "rb") as f:
movies = pickle.load(f)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment