A Streamlit-based application that provides personalized TV show recommendations using OpenAI's language models and a RAG (Retrieval Augmented Generation) system.
- Interactive UI for TV show recommendations
- Support for multiple recommendation styles
- RAG system using TV show data
- Customizable model settings
- Secure API key management
You can test the application at: https://recommendmetv.streamlit.app/
- Handles the retrieval-augmented generation system
- Loads and processes TV show data from CSV
- Creates embeddings and vector store using FAISS
- Retrieves similar shows based on user queries
- Loads and parses prompt templates from markdown files
- Extracts input variables from templates
- Organizes prompts for different recommendation styles
- Manages the language model interactions
- Combines user preferences with RAG results
- Generates personalized recommendations
- Handles error cases gracefully
- Install required packages:
pip install streamlit langchain langchain-openai langchain-community faiss-cpu python-dotenv- Run the application:
streamlit run app.py-
Enter your OpenAI API key in the sidebar
-
Select your preferences:
- Choose a recommendation style
- Select model and temperature settings
- Input your TV show preferences
- Get personalized recommendations
app.py: Main application fileprompts.md: Contains prompt templates for different recommendation stylesTV_show_data_summary_only.csv: TV show database.env: (Optional) For storing API keys
- Python 3.8+
- OpenAI API key
- Required Python packages (see Usage section)
Remember to keep your OpenAI API key secure and never share it publicly.