Movie Recommendation System with Neo4j This project demonstrates how to build a simple recommendation system using knowledge graphs with Neo4j. It includes scripts for importing movie data, generating recommendations, and a simple web interface. Setup Instructions
- Install Required Packages bashpip install neo4j pandas flask
- Set Up Neo4j
Download and install Neo4j Desktop Create a new database (or use Neo4j Aura) Start the database and note the connection details:
URI: bolt://localhost:7687 Username: neo4j Password: (your password)
- Import Data
Update the connection details in scripts/import_data.py Run the import script:
bashpython scripts/import_data.py 4. Run the Web Application bashpython app/app.py
Open your browser and go to http://localhost:5000
Project Components
Data Import: Script to import movie data into Neo4j Recommendation Engine: Implements both content-based and collaborative filtering approaches Web Interface: Simple Flask application to interact with the recommendation system
How It Works This recommendation system uses graph relationships to find movies similar to ones you like, based on:
Shared genres (content-based) Similar user preferences (collaborative filtering)
Graph Model (User)-[:LIKES]->(Movie) (Movie)-[:BELONGS_TO_GENRE]->(Genre) Sample Queries See the scripts/recommendations.py file for example recommendation queries.