- Project Overview
- Features
- Tech Stack
- Project Structure
- Setup Guide
- Usage
- Data Sources
- Recommendation Algorithms
- API Integration
- Future Enhancements
- Contributing
- License
The Movie Recommender System is a Python-based web application that provides personalized movie recommendations using Natural Language Processing (NLP) techniques. Built with Streamlit, this system offers an intuitive interface for users to discover new movies based on various criteria such as similar movies, genres, production companies, and cast members.
- Multiple recommendation algorithms based on movie attributes
- Detailed movie information display (overview, ratings, cast, etc.)
- Cast information with biographies
- Comprehensive movie list with pagination
- User-friendly interface powered by Streamlit
- Python 3.7+
- Streamlit
- Pandas
- NLTK
- Scikit-learn
- Requests (for API calls)
movie-recommender-system/
│
├── main.py # Main application file
├── processing/
│ ├── __init__.py
│ ├── preprocess.py # Data preprocessing and recommendation logic
│ └── display.py # Display helper functions
│
├── Files/
│ ├── movies_dict.pkl # Preprocessed movie data
│ ├── movies2_dict.pkl # Additional movie data
│ ├── new_df_dict.pkl # Processed dataframe for recommendations
│ ├── similarity_tags_genres.pkl
│ ├── similarity_tags_keywords.pkl
│ ├── similarity_tags_tags.pkl
│ ├── similarity_tags_tcast.pkl
│ └── similarity_tags_tprduction_comp.pkl
│
├── tmdb_5000_credits.csv # Raw movie credits data
├── tmdb_5000_movies.csv # Raw movie data
├── requirements.txt # Project dependencies
└── README.md # Project documentation
Follow these steps to set up the Movie Recommender System on your local machine:
-
Clone the repository
git clone https://github.com/yourusername/movie-recommender-system.git cd movie-recommender-system -
Set up a virtual environment (optional but recommended)
python3 -m venv movrecenv source movrecenv/bin/activate # On Windows, use `movrecenv\Scripts\activate` -
Install the required dependencies
pip install -r requirements.txt -
Download the necessary NLTK data(optional, no need to use this)
python3 -c "import nltk; nltk.download('stopwords')" -
Prepare the data (optional to need to do this too)
- Ensure that
tmdb_5000_credits.csvandtmdb_5000_movies.csvare in the project root directory. - Run the preprocessing script to generate the required pickle files:
python3 processing/preprocess.py
- Ensure that
-
Set up TMDB API(optional, dont do this too, I ave checked this the api key is aleady there and working)
- Sign up for a TMDB API key at https://www.themoviedb.org/settings/api
- Create a
.envfile in the project root and add your API key:TMDB_API_KEY=your_api_key_here
-
Run the Streamlit app (Final step to run) Good luck
streamlit run main.py
The application should now be running on http://localhost:8501.
- Open the application in your web browser.
- Choose one of the following options:
- "Recommend me a similar movie" ---here you give it a movie name, it gives out similar movie using a recommendation algo.
- "Describe me a movie" --- here you describe in natural sentence the movie you like to watch, and it recommends you the movie. suing natural language processing.
- "Check all Movies" -ust a list.
- Follow the on-screen instructions to explore movie recommendations and details.
This project uses the TMDB 5000 Movie Dataset, which includes:
- tmdb_5000_movies.csv: Contains movie metadata
- tmdb_5000_credits.csv: Contains cast and crew information
Additional movie details and images are fetched in real-time from the TMDB API.
The system uses several recommendation algorithms based on cosine similarity:
- Tags-based recommendation
- Genre-based recommendation
- Production company-based recommendation
- Keyword-based recommendation
- Cast-based recommendation
mainly it has to algorightms. one for recommendations and another for natural language processing.
These algorithms use precomputed similarity matrices stored in pickle files for efficient recommendation generation.
The project integrates with The Movie Database (TMDB) API to fetch:
- Movie posters
- Detailed cast information
- Person biographies
Ensure you have a valid API key set up as described in the Setup Guide.
-editied for dilip singh(singhkdilip18@gmail.com) by shreyam adhikari(shreyam1008@gmail.com)
Contributions to improve the Movie Recommender System are welcome. Please follow these steps:
All right of the original project belongs to https://github.com/AnupamMittal-21/Movie-Recommender-System?tab=readme-ov-file
This is a forked project with some minor edit(now and later) for the use for testing/school project. Any stars/credits/contributions to be made on the original repo.
--for contribution.
- Fork the repository
- Create a new branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.