This project is a movie recommendation system that consists of two main components: a Python part for data preprocessing, model training, and recommendation generation, and a Go part that provides an API for fetching recommendations.
The movie recommendation system uses collaborative filtering to generate movie recommendations for users. The system is divided into two parts:
- Python Part: Handles data preprocessing, model training, recommendation generation, and evaluation.
- Go Part: Provides a REST API to fetch recommendations for users.
recSystem/
│
├── python/
│ ├── Dockerfile
│ ├── requirements.txt
│ ├── preprocess.py
│ ├── main.py
│ ├── database.py
│ ├── similarity.py
│ ├── recommendations.py
│ ├── README.md
│ └── tests/
│ ├── test_database.py
│ ├── test_integration.py
│ ├── test_preprocess.py
│ ├── test_recommendations.py
│ └── testt_similarity.py
├── go/
│ ├── Dockerfile
│ ├── go.mod
│ ├── go.sum
│ ├── main.go
│ ├── handlers.go
│ ├── handlers_test.go
│ └── README.md
│
└── data/
├── movies.csv
├── ratings.csv
├── train_ratings.csv
├── test_ratings.csv
└── recommendations.db
- Docker
- Python 3.x
- Go 1.18 or higher
- Navigate to the Python directory:
cd python
- Install the required Python packages:
pip install -r requirements.txt
- Run the preprocessing script:
python preprocess.py
- Run the main script to train the model and generate recommendations:
python main.py
- Navigate to the Go directory:
cd go
- Build the Docker image:
docker build -t recommendations-api .
- Run the Docker container:
docker run -p 8080:8080 recommendations-api
You can fetch movie recommendations for a user by sending a GET request to the API.
Example:
curl http://localhost:8080/recommendations/1/5
This project is licensed under the MIT License.