CoolFace
Apppublic

ABZanganeh/movie-agent-service

sourceHugging Facemitupdated 8mo agoView on Hugging Face
1likes
App README

๐ŸŽฌ Movie Agent - AI Movie Discovery & Quiz Assistant

An intelligent AI-powered movie agent that helps you discover movies, analyze posters, play interactive quizzes, and explore movie statistics. Built with LangChain, OpenAI, and Groq.

โœจ Features

  • โ€”๐ŸŽฏ Movie Discovery: Search and discover movies based on your preferences
  • โ€”๐Ÿ–ผ๏ธ Poster Analysis: Upload movie posters and get AI-powered analysis with mood detection
  • โ€”๐Ÿง  Interactive Quizzes: Play movie quizzes about cast, directors, and release years
  • โ€”๐Ÿ“Š Movie Statistics: Get insights on ratings, genres, and top-rated movies
  • โ€”๐Ÿ’ฌ Conversational AI: Natural language interaction powered by LLMs (OpenAI/Groq)

๐Ÿš€ Quick Start

  1. 1.Set up API Keys: Configure your API keys in the Space settings:
  2. 2.GROQ_API_KEY or OPENAI_API_KEY for LLM
  3. 3.OPENAI_API_KEY for embeddings (required)
  1. 1.Start Chatting: Ask questions like:
  2. 2."Show me the best movies from 2010"
  3. 3."Let's play a cast quiz"
  4. 4."What are the top rated action movies?"
  1. 1.Analyze Posters: Upload a movie poster image to get AI-powered analysis

๐Ÿ› ๏ธ Configuration

The app uses environment variables for configuration. Set these in your Space settings:

  • โ€”LLM_PROVIDER: groq or openai (default: groq)
  • โ€”LLM_MODEL: Model name (default: llama-3.1-8b-instant)
  • โ€”GROQ_API_KEY: Your Groq API key
  • โ€”OPENAI_API_KEY: Your OpenAI API key (for embeddings and LLM if using OpenAI)
  • โ€”ENABLE_VISION: Enable poster analysis (default: false)
  • โ€”ENABLE_MEMORY: Enable conversation memory (default: true)

๐Ÿ“š Use Cases

  • โ€”Movie Discovery: Find movies by genre, year, rating, or director
  • โ€”Poster Analysis: Identify movies from poster images
  • โ€”Interactive Learning: Play quizzes to test your movie knowledge
  • โ€”Data Analysis: Get statistics on movie ratings, genres, and trends

๐Ÿ”ง Technical Details

  • โ€”Framework: Flask
  • โ€”AI/ML: LangChain, OpenAI, Groq
  • โ€”Vector Store: FAISS with OpenAI embeddings
  • โ€”Vision: BLIP model for poster analysis
  • โ€”Deployment: Docker on Hugging Face Spaces

๐Ÿ“– Examples

Movie Search:

User: "Show me action movies from 2020"
Agent: [Lists action movies from 2020]

Quiz:

User: "Let's play a director quiz"
Agent: [Starts interactive quiz about movie directors]

Poster Analysis:

User: [Uploads poster]
Agent: "This appears to be 'The Matrix' (1999) - Sci-Fi, Action"

๐Ÿ”— Links

๐Ÿ“ License

MIT License - See LICENSE file for details