A command line app that recommends horror movies based on your keywords (rating, year, keyword). Uses Anthropic Claude model with tool use (API). The model calls a Python function that fetches data from IMDb's open dataset.
- python -m venv venv
- venv\Scripts\activate (Windows) source venv/bin/activate (Mac/Linux)
- pip install -r requirements.txt
- copy .env.example .env (Windows) cp .env.example .env (Mac/Linux)
- open .env and add your own ANTHROPIC_API_KEY
- Go to console.anthropic.com and create an account.
- Add a payment method. Creating a key is free, but using the API is billed per token :(
- Go to 'API keys' and click 'create key'
- Copy the key immediately. It should look something like "sk-ant-api03-...".
- Paste it into your .env-file
-
Build the database (downloads IMDb's datasets): python data_loader.py
-
Start the recommender: python main.py
-
Type, for example: You: "psychological horror from 2015-2022, rating above 7", "clown horror, rating under 5", or "anything from 2008"
The app currently prints its answers in Finnish. "Switching the app to English" is below if you'd rather it run fully in English.
You can change the texts in 'llm_agent.py' and the 'SYSTEM_PROMPT' string, which instructs the model in Finnish.
- 'ModuleNotFoundError' - you haven't activated the venv, or skipped 'pip install -r requirements.txt'.
- 'KeyError: 'ANTHROPIC_API_KEY'' - .env-file is missing or not in the same folder as 'main.py', or the key name doesn't match exactly.
- 'authentication_error' from the API** - the key was copied incorrectly or your account has no credits.
- Network error in 'data_loader.py' - check your network settings.
- Content-based keyword search (adding the TMDb API so you can search by theme)
- Web UI (replace the CLI with an app)
IMDb Non-Commercial Datasets: https://developer.imdb.com/non-commercial-datasets/ (non-commercial use only)