movie-recommender / utils.py
elozano's picture
first version
8d0b477
raw
history blame contribute delete
282 Bytes
import streamlit as st
def get_index(title: str) -> int:
movies = st.session_state["movies"]
return movies[movies["original_title"] == title].index.values[0]
def get_movie_info(movie_index: int) -> dict:
return st.session_state["movies"].iloc[movie_index].to_dict()