ABZanganeh/movie-agent-service
1
๐ฌ 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
- Set up API Keys: Configure your API keys in the Space settings:
GROQ_API_KEYorOPENAI_API_KEYfor LLMOPENAI_API_KEYfor embeddings (required)
- Start Chatting: Ask questions like:
- "Show me the best movies from 2010"
- "Let's play a cast quiz"
- "What are the top rated action movies?"
- 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:groqoropenai(default:groq)LLM_MODEL: Model name (default:llama-3.1-8b-instant)GROQ_API_KEY: Your Groq API keyOPENAI_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
