Skip to content

karapetianash/recSystem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Movie Recommendation System

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.

Table of Contents

Overview

The movie recommendation system uses collaborative filtering to generate movie recommendations for users. The system is divided into two parts:

  1. Python Part: Handles data preprocessing, model training, recommendation generation, and evaluation.
  2. Go Part: Provides a REST API to fetch recommendations for users.

Structure

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

Setup

Prerequisites

  • Docker
  • Python 3.x
  • Go 1.18 or higher

Python Part

  1. Navigate to the Python directory:
cd python
  1. Install the required Python packages:
pip install -r requirements.txt
  1. Run the preprocessing script:
python preprocess.py
  1. Run the main script to train the model and generate recommendations:
python main.py

Go Part

  1. Navigate to the Go directory:
cd go
  1. Build the Docker image:
docker build -t recommendations-api .
  1. Run the Docker container:
docker run -p 8080:8080 recommendations-api

Usage

Fetch Recommendations

You can fetch movie recommendations for a user by sending a GET request to the API.

Example:

curl http://localhost:8080/recommendations/1/5

License

This project is licensed under the MIT License.