A machine learning-powered movie recommendation system built with Python, leveraging vector embeddings (pgvector) on Supabase for scalable, fast, and personalized suggestions. Now featuring a "Watch" button for instant movie viewing!
- AI-Powered Recommendations: Personalized movie suggestions using vector similarity search.
- Watch Movies Directly: Instantly stream recommended movies with the new watch feature.
- Massive Movie Database: Millions of movies with metadata and embeddings.
- Blazing Fast: Uses pgvector for high-performance similarity queries.
- Modern Stack: Python backend, PostgreSQL (pgvector), Supabase, Streamlit/React frontend.
- Backend: Python, Flask
- Database: PostgreSQL + pgvector (on Supabase)
- Data: TMDB API for movie metadata
- Frontend: Streamlit, Svelte, or React components
- Other: Docker (optional), Redis (optional for caching)
git clone https://github.com/Talnz007/Movie_Recomendation_System.git
cd Movie_Recomendation_Systempython3 -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activatepip install -r requirements.txtCopy and edit the .env.example file:
cp .env.example .envFill in your database and TMDB API credentials in .env.
python main.pyOr, if you have a frontend:
streamlit run app.pyEdit .env as follows:
DB_USER=your_db_user
DB_PASSWORD=your_db_password
DB_HOST=your_db_host
DB_PORT=6543
DB_NAME=your_db_name
DB_OPTIONS=-c statement_timeout=0
TMDB_API_KEY=your_tmdb_api_key
- Start the app: Run the backend and frontend as above.
- Search for a movie: Enter a movie you like.
- Get recommendations: The system finds similar movies using vector similarity search.
- Watch a movie: Click the "Watch" button to stream a recommended title.
OR JUST GO TO This Link
- Embeddings: Each movie is represented as a vector (embedding) in a high-dimensional space.
- Vector Search: When you select a movie, the app finds other movies with similar embeddings using pgvector.
- Supabase: Provides scalable, cloud-hosted PostgreSQL with vector support.
- Integrated Watching: Watch workflow connects you to available streaming sources.
Movie_Recomendation_System/
├── api/ # API backend code
├── frontend/ # Frontend UI code
├── database.py # Database logic
├── main.py # Main app logic
├── app.py # App entry point for Streamlit
├── requirements.txt # Python dependencies
├── .env.example # Example environment config
├── .gitignore
└── README.md
- Never commit your
.envfile (it’s in .gitignore). - Update
requirements.txtregularly for security. - Check GitHub Security Alerts for vulnerabilities.
- Fork this repo
- Create your feature 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
- Collaborative filtering and hybrid models
- User profiles and login
- Advanced analytics and rating system
- Improved streaming provider integration
This project is licensed under the MIT License.
Maintained by Talha Niazi
Project URL: https://github.com/Talnz007/Movie_Recomendation_System

