An intelligent movie recommendation system built using Machine Learning + FastAPI + Streamlit. This project suggests similar movies based on semantic similarity using AI embeddings.
- 🌐 Streamlit App: (https://ai-recommendation-system-streamlit.onrender.com)
- ⚡ FastAPI Backend: (https://ai-recommendation-system-fastapi.onrender.com)
- 🔍 Smart movie search with auto-suggestions
- 🤖 AI-based recommendations using sentence embeddings
- 🎯 Fuzzy search (handles typos like "interstella" → "interstellar")
- 🖼️ Movie posters fetched from TMDB API
- ⭐ Similarity score for each recommendation
- 🎬 Clean UI with Streamlit (grid layout)
- ⚡ FastAPI backend for high performance
-
Movie data is loaded from a dataset (
dataset.csv) -
Text features are combined:
- Synopsis
- Genre
- Director
- Content
-
AI embeddings are generated using:
sentence-transformers (all-MiniLM-L6-v2)
-
Cosine similarity is used to find similar movies
-
Results are filtered (genre + quality filters)
-
Posters are fetched from TMDB API
- Python
- FastAPI (Backend API)
- Streamlit (Frontend UI)
- Scikit-learn (Cosine similarity)
- Sentence Transformers (Embeddings)
- RapidFuzz (Fuzzy search)
- TMDB API (Movie posters)
AI-Movie-Recommender/
│
├── api/
│ └── main.py # FastAPI backend
│
├── model/
│ └── recommender.py # Recommendation logic
│
├── data/
│ └── dataset.csv # Movie dataset
│
├── dashboard/ # Streamlit frontend
│ └──app.py
├── embeddings.npy # Precomputed embeddings
└── README.md
git clone https://github.com/wpko/AI-Recommendation-System.git
cd AI-Recommendation-System
python -m venv venv
venv\Scripts\activate # Windows
pip install -r requirements.txt
- Create account at: https://www.themoviedb.org/
- Get your API key
- Add it in
main.py:
API_KEY = "your_tmdb_api_key"python -m uvicorn api.main:app --reload
👉 API will run at: http://127.0.0.1:8000
streamlit run app.py
👉 UI will open in browser automatically
-
Input:
interstella -
Output:
- Interstellar-like movies
- Posters + similarity scores
- 🔥 Personalized recommendations
- 🎞️ Trailer integration (YouTube API)
Feel free to fork this repository and improve it!
Wai Lay Aspiring AI / Python Developer 🚀
⭐ If you like this project, give it a star on GitHub!





