How zunnu786/movie-recommender-system works
Project type and purpose
• This is a lightweight, single-page web application (full-stack at a small scale) built in Python using Streamlit.
• Its sole purpose is to let a user pick a movie from a dropdown and receive a list of similar movies via a collaborative-filtering recommender.
File structure
• Top level:
• README.md – documentation
• dataset.zip – raw data archive
• movies.pkl, movie_dict.pkl – precomputed data pickles (movie metadata and similarity indices)
• movie_recommer_system.ipynb – the notebook containing the Streamlit app code and recommendation logic
• No separate “backend” or “frontend” directories: Streamlit serves both the UI and the logic in one process.
• No external database or microservice folders—data is loaded directly from pickles.
README for additional insights
• Frameworks: Python 3, Streamlit, Pandas
• Execution: “streamlit run app.py” (though code is in the notebook)
• Algorithm: collaborative filtering based on movie features to compute pairwise similarity scores.
Main components
a. User Interface (Browser / Streamlit frontend)
b. Streamlit Application Server (Python runtime)
• UI Renderer (Streamlit widgets, dropdown, button)
• Controller (handles user events)
• Recommendation Engine
– Data Loader (loads movies.pkl & movie_dict.pkl)
– Similarity Calculator (collaborative filtering logic)
c. Data Layer
• Pickle Store (movies.pkl, movie_dict.pkl)
• (Optionally) dataset.zip as the raw data source
d. External Dependencies (shown as libraries)
• Streamlit
• Pandas
• Python Interpreter
Relationships and interactions
1. User selects a movie in the browser →
2. Streamlit frontend sends an event to the Application Server →
3. Controller calls Data Loader if pickles aren’t cached →
4. Similarity Calculator queries the in-memory data structures →
5. Engine returns a ranked list of movies →
6. UI Renderer displays recommendations back to the browser
Architectural patterns & design principles
• Single-process MVC style:
• Model = pickled data + data-loading module
• View = Streamlit widgets & page layout
• Controller = event handlers wiring UI to the recommendation logic
• In-memory caching of pickles on first load for performance
• Clear separation of concerns: UI vs. data vs. algorithm