How prashant3420/movie-recommendation-system works
What this project is (type + purpose)
This repository is a small Python-based web app that serves a movie recommendation system. The presence of:
• app.py (single entrypoint)
• requirements.txt (Python dependencies)
• Procfile, setup.sh (typical Heroku-style deployment artifacts)
• movies.pkl, movie_dict.pkl (precomputed model/data artifacts)
• tmdb_5000_movies.csv, Untitled1.ipynb (offline dataset + notebook used to build/preprocess artifacts)
…strongly suggests a two-phase architecture:
How to read the file structure architecturally
Files to architectural responsibilities:
Runtime / serving
• app.py
The application server (likely a Streamlit/Flask-style UI + recommendation logic).
• requirements.txt
• Procfile, setup.sh
Deployment/runtime wiring (Heroku dyno start command, environment setup).
Model/data artifacts used at runtime
• movies.pkl, movie_dict.pkl
Treated as the “model”/“index”/“feature store” equivalent in a lightweight app. These are core runtime dependencies.
Offline build inputs
• tmdb_5000_movies.csv
Source dataset.
• Untitled1.ipynb
Offline pipeline to transform CSV into the .pkl artifacts.
What to put
For best accuracy, separate into containers (deployable/runtime units) and data artifacts.
Web App Container (Heroku Dyno)
• Process started via Procfile
• Code: app.py
• Dependencies: requirements.txt
Recommendation Engine (in-process module inside app.py)
• Loads pickles into memory
• Computes similarity / ranking
Local Data Artifacts (bundled with app)
• movies.pkl
• movie_dict.pkl
*(Optional but common in movie recommenders: if app.py calls external APIs for posters/metadata, add it explicitly—see section 5.)*
Data Source (CSV)
• tmdb_5000_movies.csv
Feature/Model Build Notebook
• Untitled1.ipynb
Generated Artifacts
• output: movies.pkl, movie_dict.pkl
Artifact Packaging
• committed to repo / included in deploy slug
This gives a complete picture: “Where do recommendations come from?” and “What does production depend on?”
Browser → Web App
• user inputs: selected movie / query
Web App → Recommendation Engine (inside same process)
• call: get_recommendations(movie_id/title)
Recommendation Engine → Pickle Artifacts
• loads/reads: movies.pkl, movie_dict.pkl
Recommendation Engine → Web App
• returns: list of recommended movie titles/ids (and maybe posters)
Web App → Browser
• renders recommendations UI
“Don’t overthink it”: maximize component separation for clarity
• UI Layer (input/output rendering)
• Recommendation Logic (similarity/ranking)
• Artifact Loader / Data Access (reads pkl)
• (Optional) External Metadata Client (TMDB API client)
This is the best way to capture “essential architectural elements” in a small repo without inventing services that don’t exist.