Skip to content

dawnbliss-coder/book-recommender-rag

Repository files navigation

LLM Book Recommender

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.

LLM Book Recommender dashboard

About the project

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."

Tech stack

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+

How to run

  1. Clone the repository and move into it:

    git clone <repository-url>
    cd LLM-Book-Recommender
  2. Create and activate a virtual environment (recommended):

    python -m venv .venv
    source .venv/bin/activate  # On Windows: .venv\Scripts\activate
  3. Install dependencies:

    pip install -r requirements.txt
  4. Start the app:

    python gradio-dash.py
  5. Open http://127.0.0.1:7860 in your browser, describe a book, and optionally narrow results by category or emotional tone.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages