Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎬 Cinemoods

Cinemoods

Emotion-Based Movie Recommendation Engine

AI-powered movie recommendation platform that leverages Transformer-based emotion recognition to deliver personalized movie suggestions aligned with the user's emotional state.

Python Streamlit PyTorch Transformers NLP


Executive Summary

Cinemoods is an intelligent recommendation platform that combines Natural Language Processing, Transformer-based emotion classification, and personalized recommendation techniques to suggest movies based on emotional context.

Unlike traditional recommendation systems that primarily rely on ratings, collaborative filtering, or viewing history, Cinemoods focuses on emotional alignment between the user's current mood and movie narratives.

The platform processes movie descriptions, identifies dominant emotional signatures using a Hugging Face Transformer model, and recommends movies that emotionally resonate with the user.


Business Problem

Traditional movie recommendation systems often fail to understand emotional intent.

Examples:

  • Users feeling stressed may want comforting content.
  • Users feeling adventurous may prefer exciting narratives.
  • Users experiencing sadness may seek uplifting stories.

Current recommendation engines primarily rely on:

  • Collaborative filtering
  • Genre matching
  • Popularity rankings
  • User history

These systems do not explicitly incorporate emotional context.

Cinemoods addresses this gap by introducing emotion-aware recommendations powered by Transformer-based NLP.


Key Features

Emotion Detection

  • Transformer-based emotion classification
  • Hugging Face model integration
  • Context-aware text analysis
  • Multi-emotion support

Supported emotions:

  • Joy
  • Sadness
  • Anger
  • Fear
  • Surprise
  • Disgust
  • Neutral

Intelligent Recommendation Engine

  • Emotion-based filtering
  • Rating-based ranking
  • Genre-aware recommendations
  • Fallback recommendation strategy

NLP Processing Pipeline

  • Text normalization
  • Stopword removal
  • Tokenization
  • Overview preprocessing

Interactive Dashboard

  • Streamlit application
  • Cinematic UI
  • Search functionality
  • Recommendation visualization
  • Analytics dashboard

System Architecture

flowchart LR

A[Raw Movie Dataset] --> B[Preprocessing Pipeline]

B --> C[Cleaned Movie Descriptions]

C --> D[Emotion Classification Model]

D --> E[Emotion-Enriched Dataset]

E --> F[Recommendation Engine]

F --> G[Streamlit Application]

G --> H[User Input]

H --> I[Emotion Detection]

I --> J[Movie Recommendations]

J --> K[Visualization Dashboard]
Loading

Solution Workflow

sequenceDiagram

participant User
participant Streamlit
participant EmotionModel
participant Recommender
participant Dataset

User->>Streamlit: Enter Mood / Text
Streamlit->>EmotionModel: Predict Emotion
EmotionModel-->>Streamlit: Emotion Label
Streamlit->>Recommender: Request Recommendations
Recommender->>Dataset: Filter Movies
Dataset-->>Recommender: Matching Movies
Recommender-->>Streamlit: Top Recommendations
Streamlit-->>User: Display Results
Loading

Technology Stack

Category Technology
Frontend Streamlit
Backend Python
NLP NLTK
Deep Learning PyTorch
Transformer Models Hugging Face Transformers
Data Processing Pandas
Visualization Matplotlib
Model Hub Hugging Face Hub
Recommendation Engine Custom Logic

Project Structure

Cinemoods
│
├── app.py
│
├── assets
│   ├── hero_banner.png
│   └── default_poster.png
│
├── data
│   ├── raw_movies.csv
│   ├── processed_movies.csv
│   └── processed_movies_with_emotions.csv
│
├── models
│
├── notebooks
│
├── src
│   ├── __init__.py
│   ├── preprocessing.py
│   ├── emotion_model.py
│   ├── recommender.py
│   └── visualization.py
│
├── requirements.txt
└── README.md

Machine Learning Pipeline

flowchart TD

A[Raw Movie Overview]

A --> B[Lowercasing]

B --> C[Special Character Removal]

C --> D[Tokenization]

D --> E[Stopword Removal]

E --> F[Clean Overview]

F --> G[Transformer Model]

G --> H[Emotion Classification]

H --> I[Dominant Emotion]
Loading

Emotion Classification Engine

Model

j-hartmann/emotion-english-distilroberta-base

Framework:

Hugging Face Transformers
PyTorch

Classification Categories:

anger
disgust
fear
joy
neutral
sadness
surprise

Recommendation Algorithm

Stage 1

Filter movies by:

Dominant Emotion

Stage 2

Apply:

Genre Matching

Stage 3

Sort by:

IMDb Rating

Stage 4

Fallback Strategy

If no emotional match exists:

Top Rated Movies

are returned.


Core Components

preprocessing.py

Responsibilities:

  • Dataset loading
  • Missing value handling
  • NLP preprocessing
  • Data cleaning
  • Dataset generation

emotion_model.py

Responsibilities:

  • Transformer initialization
  • Emotion prediction
  • Dataset emotion enrichment
  • Batch processing

recommender.py

Responsibilities:

  • Recommendation logic
  • Genre filtering
  • Rating prioritization
  • Fallback recommendations

visualization.py

Responsibilities:

  • Analytics generation
  • Distribution plots
  • Emotion visualizations
  • Dashboard charts

app.py

Responsibilities:

  • Streamlit UI
  • User interaction
  • Search functionality
  • Recommendation display
  • Dashboard rendering

Installation

Clone Repository

git clone https://github.com/auditee/Cinemoods.git

cd Cinemoods

Create Environment

python -m venv venv

Windows

venv\Scripts\activate

Linux / macOS

source venv/bin/activate

Install Dependencies

pip install -r requirements.txt

Running the Data Pipeline

Step 1

Preprocess Dataset

python src/preprocessing.py

Step 2

Generate Emotion Labels

python src/emotion_model.py

Launch Application

streamlit run app.py

Screenshots

Home Page

Insert screenshot here

Recommendation View

Insert screenshot here

Analytics Dashboard

Insert screenshot here

Performance Highlights

  • Transformer-based emotion inference
  • Automated recommendation generation
  • Explainable recommendation workflow
  • Modular architecture
  • Easily extensible codebase
  • Production-ready project structure

Future Enhancements

TMDB Integration

  • Live posters
  • Movie trailers
  • Dynamic ratings

Vector Database

  • ChromaDB
  • FAISS

Semantic recommendation search.

RAG Integration

Emotion-aware Retrieval-Augmented Generation.

User Authentication

  • Watchlists
  • User profiles
  • Mood history

Voice Emotion Recognition

Real-time speech emotion detection.

LLM Assistant

Conversational movie recommendation agent.


Resume Project Description

Cinemoods – Emotion-Based Movie Recommendation Engine

Developed an AI-powered movie recommendation platform leveraging Hugging Face Transformers, PyTorch, and NLP techniques to analyze emotional context and generate personalized movie suggestions. Implemented an end-to-end recommendation pipeline including text preprocessing, Transformer-based emotion classification, rating-aware filtering, and an interactive Streamlit dashboard. Designed a modular architecture supporting emotion analytics, visualization, and scalable recommendation workflows.


Author

Auditee Chowdhury

B.Tech Computer Science & Engineering

Artificial Intelligence | NLP | Machine Learning | Generative AI

GitHub: https://github.com/auditee


About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages