A content-based course recommendation system built with FastAPI, scikit-learn, and NLP. Select a course you love and discover the 5 most similar courses using TF-IDF vectorization and cosine similarity.
- Features
- Demo
- Installation
- Usage
- Deployment on Render
- Tech Stack
- Project Structure
- Contributing
- License
- Search-based course selection with real-time filtering and keyboard navigation
- Top 5 NLP-powered recommendations ranked by cosine similarity score
- Multi-page layout: Home, Recommend, About, Contact
- Dark/light theme toggle with localStorage persistence
- Responsive monochrome design, no external UI frameworks
- Instant results via precomputed similarity matrix
Live Deployment (Render): https://udemy-harshit-course-recommender.onrender.com
Clone the repository:
git clone https://github.com/HARSHIT071004/Course-recommender.git
cd Course-recommenderCreate a virtual environment and activate it:
python -m venv venv
source venv/bin/activate # Linux/Mac
venv\Scripts\activate # WindowsInstall dependencies:
pip install -r requirements.txtRun the development server:
python -m uvicorn app:app --host 127.0.0.1 --port 5000 --reloadOr without reload:
python -m uvicorn app:app --host 127.0.0.1 --port 5000Open your browser at http://127.0.0.1:5000.
Ensure requirements.txt contains:
fastapi
uvicorn[standard]
jinja2
python-multipart
scikit-learn
pandas
gunicorn
On Render:
- Create a New Web Service
- Select Python 3 as environment
- Connect your GitHub repo
- Branch:
main - Build Command:
pip install -r requirements.txt - Start Command:
gunicorn app:app - Deploy
- FastAPI — async Python web framework
- uvicorn — ASGI server
- scikit-learn — TfidfVectorizer, cosine_similarity
- pandas — data loading and manipulation
- Jinja2 — template rendering
- Vanilla JS — no framework, no build step
Course-Recommender-NLP/
├── app.py # FastAPI routes and server entry point
├── model.py # CourseRecommender class (TF-IDF + similarity)
├── requirements.txt # Python dependencies
├── data/
│ └── courses.csv # Udemy course dataset (11 columns)
├── static/
│ └── style.css # Monochrome design system with dark/light themes
└── templates/
├── base.html # Shared layout (nav, theme toggle, footer)
├── home.html # Hero, features, how-it-works
├── recommend.html # Search bar + recommendation grid
├── about.html # Project info, tech stack, stats
└── contact.html # Contact form
- Fork the repository
- Create a new branch
- Make your changes
- Submit a Pull Request
By Harshit Sharma
This project is licensed under the MIT License.