Skip to content

prem043m/Movie_recommendation_app

Repository files navigation

Movie Recommendation App

Streamlit app that recommends similar movies using a precomputed similarity matrix.

Features

  • Movie search and filters
  • Top recommendations with metadata
  • Optional poster fetching from TMDB API
  • Works locally and on Streamlit Cloud

Run Locally

  1. Create and activate a virtual environment.
  2. Install dependencies:
pip install -r requirements.txt
  1. Create a local env file from template:
copy .env.example .env
  1. Open .env and set your TMDB key:
TMDB_API_KEY=your_tmdb_api_key_here
  1. Start the app:
streamlit run app.py

Deploy On Streamlit Cloud

  1. Push this repository to GitHub.
  2. In Streamlit Cloud, create a new app and select this repo.
  3. Set main file path to app.py.
  4. In App Settings -> Secrets, add:
TMDB_API_KEY = "your_tmdb_api_key_here"
  1. Deploy.

Secret Handling

  • Local: app reads .env automatically.
  • Cloud: app reads Streamlit Secrets (st.secrets).
  • If no key is configured, the app still runs but poster images are disabled.

Project Files

  • app.py: main Streamlit app
  • movies_data.pkl: processed movie data
  • similarity.pkl: similarity matrix
  • .env.example: local environment template
  • .streamlit/secrets.toml.example: Streamlit secrets template

About

created a app which recommend movies related to selected movie

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors