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.
- 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.
- Python 3.12.8 or later: Ensure you have Python installed.
- API Keys: Set up API keys for OpenAI and Groq.
- Environment:
pip
andvirtualenv
or any Python environment manager.
-
Clone the Repository:
git clone https://github.com/your-repo/movie-recommendation-chatbot.git cd movie-recommendation-chatbot
-
Create and Activate a Virtual Environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install Dependencies:
pip install -r requirements.txt
-
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
- Create a
-
Start the Application:
python app.py
-
Access the Application:
- Open a web browser and navigate to
http://localhost:5000
.
- Open a web browser and navigate to
- 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.
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
- Missing API Keys: Verify the
.env
file contains valid API keys. - Dependency Issues: Run
pip install --upgrade -r requirements.txt
to update dependencies.