The HarmOni AI Recommendation System is a Flask-powered API that delivers personalized movie recommendations using a hybrid recommendation approach. It integrates content-based filtering, collaborative filtering (SVD), and popularity-based filtering from IMDb to enhance accuracy.
This system is part of HarmOni, an all-in-one entertainment hub designed to enrich the media experience.
👉 Hybrid Recommendation Engine (Content-based, Collaborative Filtering & Popularity-based)
👉 User-Friendly API (Interact with the recommendation system via RESTful API)
👉 Genre-Based Recommendations (Find movies based on genre preferences)
👉 Extensible Architecture (Easily integrates with additional features & datasets)
👉 Docker Support (Run seamlessly in a containerized environment)
harmoni-ai/
├── app.py # Main Flask application
├── my_modules/
│ └── myModule.py # Core recommendation logic
├── tests/
│ └── test_app.py # Unit tests
├── data/ # Movie datasets
├── models/ # Pre-trained recommendation models
├── Dockerfile # Docker build configuration
├── docker-compose.yml # Docker Compose setup
├── requirements.txt # Python dependencies
└── README.md # Project documentation
Ensure you have the following installed:
- Python 3.8+
- Docker & Docker Compose (optional, but recommended)
- Flask (installed via
requirements.txt)
Clone the repository:
git clone https://github.com/HarmOni-Organization/harmoni-ai.git
cd harmoni-aiInstall dependencies:
pip install -r requirements.txtCopy the environment template and configure it:
cp .env.example .envEnsure the movie dataset is placed inside the data/ directory.
docker-compose up --buildpython app.py| Method | Endpoint | Description |
|---|---|---|
GET |
/recommend |
Get related & personalized movie recommendations |
GET |
/genreBasedRecommendation |
Get movie recommendations by genre |
Hybrid Recommendation
http://127.0.0.1:80/recommend?userId=2000&movieId=286217&topN=3Response
{
"data": {
"userId": 2000,
"movieId": 286217,
"recommendedMovies": [
{
"id": 157336,
"title": "Interstellar",
"release_date": "2014-11-05",
"poster_url": "https://image.tmdb.org/t/p/w500/gEU2QniE6E77NI6lCU6MxlNBvIx.jpg",
"final_score": 1.38
},
{
"id": 118340,
"title": "Guardians of the Galaxy",
"release_date": "2014-07-30",
"poster_url": "https://image.tmdb.org/t/p/w500/r7vmZjiyZw9rpJMQJdXpjgiCOk9.jpg",
"final_score": 1.31
}
]
},
"message": "Recommendations generated successfully",
"status": true
}Genre-Based Recommendation
http://127.0.0.1:80/genreBasedRecommendation?genre=Action&topN=3Response
{
"data": {
"genre": "Action",
"recommendedMovies": [
{
"id": 361743,
"title": "Top Gun: Maverick",
"release_date": "2022-05-24",
"poster_url": "https://image.tmdb.org/t/p/w500/62HCnUTziyWcpDaBO2i1DX17ljH.jpg"
}
]
},
"message": "Recommendations generated successfully",
"status": true
}pytestblack .FLASK_ENV=development python app.pyContributions are welcome! To contribute:
- Fork the repository.
- Create a feature branch:
git checkout -b feature/new-feature
- Implement and test your changes.
- Commit with a meaningful message:
git commit -m "feat: Add new recommendation logic" - Push to your fork and create a pull request.
HarmOni AI is open-source and distributed under the MIT License.