Streamlit app that recommends similar movies using a precomputed similarity matrix.
- Movie search and filters
- Top recommendations with metadata
- Optional poster fetching from TMDB API
- Works locally and on Streamlit Cloud
- Create and activate a virtual environment.
- Install dependencies:
pip install -r requirements.txt- Create a local env file from template:
copy .env.example .env- Open
.envand set your TMDB key:
TMDB_API_KEY=your_tmdb_api_key_here- Start the app:
streamlit run app.py- Push this repository to GitHub.
- In Streamlit Cloud, create a new app and select this repo.
- Set main file path to
app.py. - In App Settings -> Secrets, add:
TMDB_API_KEY = "your_tmdb_api_key_here"- Deploy.
- Local: app reads
.envautomatically. - Cloud: app reads Streamlit Secrets (
st.secrets). - If no key is configured, the app still runs but poster images are disabled.
app.py: main Streamlit appmovies_data.pkl: processed movie datasimilarity.pkl: similarity matrix.env.example: local environment template.streamlit/secrets.toml.example: Streamlit secrets template