A semantic book recommendation system that understands what you're actually looking for. Describe a book in plain language — a mood, a theme, a plot idea — and it retrieves books whose descriptions are semantically closest to what you typed, then lets you narrow the results by category and emotional tone.
Traditional book search matches keywords. This project matches meaning. Every book description is embedded into a vector space, so a query like "a story about forgiveness" can surface books that never use the word "forgiveness" at all, as long as their description is conceptually close to it.
Each book is also automatically labeled with a category (Fiction / Nonfiction) and an emotional tone (joy, sadness, anger, fear, surprise), so you can combine "books like this" with "but keep it lighthearted" or "just show me nonfiction."
| Layer | Tool |
|---|---|
| Embeddings | sentence-transformers/all-MiniLM-L6-v2 (Hugging Face) |
| Vector store / retrieval | ChromaDB via LangChain (langchain-chroma) |
| Category classification | Zero-shot classification pipeline (transformers) |
| Emotion classification | Emotion classification pipeline (transformers) |
| Data processing | pandas, numpy |
| Web app | Gradio |
| Language / runtime | Python 3.11+ |
-
Clone the repository and move into it:
git clone <repository-url> cd LLM-Book-Recommender
-
Create and activate a virtual environment (recommended):
python -m venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Start the app:
python gradio-dash.py
-
Open
http://127.0.0.1:7860in your browser, describe a book, and optionally narrow results by category or emotional tone.
