Coder Social home page Coder Social logo

aimovierecommendations's Introduction

AI Movie Recommender

๐ŸŽฌ Description

AI Movie Recommender is a Python application that leverages your Plex watch history and OpenAI's GPT model to generate personalized movie recommendations. It retrieves your recent watch history from Plex, uses an AI to analyze your preferences, and sends you an email with 10 tailored movie recommendations, complete with brief, spoiler-free summaries.

๐Ÿš€ Features

  • ๐Ÿ“บ Fetches your recent Plex watch history
  • ๐Ÿค– Utilizes OpenAI's GPT model for intelligent movie recommendations
  • ๐Ÿ” Incorporates web search capabilities for up-to-date information
  • ๐Ÿ“ง Sends recommendations via email in a beautifully formatted HTML format
  • ๐Ÿ” Secure handling of API keys and sensitive information

๐Ÿ›  Installation

  1. Clone the repository
  2. Install the required dependencies pip install -r requirements.txt
  3. Set up your environment variables by creating a .env file in the project root:
OPENAI_API_KEY=your_openai_api_key
GOOGLE_API_KEY=your_google_api_key
GOOGLE_SEARCH_ENGINE_ID=your_google_search_engine_id
SMTP_HOST=your_smtp_host
[email protected]
SMTP_FROM_NAME="AI Movie Recommendations"
SMTP_PORT=465
[email protected]
SMTP_PASSWORD=your_email_password
SMTP_SECURITY=ssl
SMTP_AUTH_MECHANISM=Plain
PLEX_AUTH_TOKEN=your_plex_auth_token
PLEX_USER_ID=your_plex_user_id

๐Ÿ–ฅ Usage

Run the main script: python main.py

The application will:

  1. Fetch your recent Plex watch history
  2. Generate movie recommendations based on your history
  3. Send an email with the recommendations

๐Ÿ“ Project Structure

  • main.py: The entry point of the application
  • plex_history.py: Handles fetching the Plex watch history
  • ai_assistant.py: Manages the AI assistant for generating recommendations
  • email_sender.py: Handles formatting and sending the email
  • utils.py: Contains utility functions for logging and environment variable management

๐Ÿค Contributing

Contributions, issues, and feature requests are welcome!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.