Skip to content

Movie recommendation app that uses RAG. It does metadata filtering using self-query retrieval.

Notifications You must be signed in to change notification settings

erentorlak/CineChat

 
 

Repository files navigation

Movie Recommendation Chatbot

This project is a Flask-based web application that provides movie recommendations based on user queries. It uses advanced language models and vector-based search to retrieve and rank movie suggestions. The system integrates multiple AI-powered APIs and models to ensure an engaging and accurate chatbot experience.


Interface

Chatbot Interface

Features

  • Movie Recommendations: Suggests movies based on user input and retrieves relevant titles with detailed metadata.
  • Flask-based Web Interface: Simple and user-friendly web interface for interaction.
  • AI-Powered Search: Uses OpenAI embeddings and self-query retrievers to find the most relevant movies.
  • Customizable Backend: Supports Groq and OpenAI models for dynamic query handling.

Prerequisites

  1. Python 3.12.8 or later: Ensure you have Python installed.
  2. API Keys: Set up API keys for OpenAI and Groq.
  3. Environment: pip and virtualenv or any Python environment manager.

Installation

  1. Clone the Repository:

    git clone https://github.com/your-repo/movie-recommendation-chatbot.git
    cd movie-recommendation-chatbot
  2. Create and Activate a Virtual Environment:

    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
  3. Install Dependencies:

    pip install -r requirements.txt
  4. Set Up Environment Variables:

    • Create a .env file in the project directory.
    • Add the following variables:
      OPENAI_API_KEY=your_openai_api_key
      GROQ_API_KEY=your_groq_api_key

Running the Application

  1. Start the Application:

    python app.py
  2. Access the Application:

    • Open a web browser and navigate to http://localhost:5000.

Usage

  • Use the chatbot interface to ask for movie recommendations or details.
  • The chatbot will return:
    • A list of movie suggestions with metadata (title, year, rating, etc.).
    • A response based on your query generated by the AI model.

Project Structure

movie-recommendation-chatbot/
|
├── app.py                  # Main Flask application
├── requirements.txt        # Python dependencies
├── templates/
│   └── chat.html           # HTML template for the chatbot UI
├── static/
│   └── styles.css          # CSS for UI styling (if any)
├── CineChatCSV_cleaned_new.csv  # Input dataset
├── .env                    # Environment variables file
└── README.md               # Documentation

Troubleshooting

  • Missing API Keys: Verify the .env file contains valid API keys.
  • Dependency Issues: Run pip install --upgrade -r requirements.txt to update dependencies.



About

Movie recommendation app that uses RAG. It does metadata filtering using self-query retrieval.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 40.4%
  • CSS 33.6%
  • HTML 26.0%