This project is an intelligent Book Recommendation System that leverages Semantic Search, Large Language Models (LLMs), and emotion-based filtering to suggest books that match the intent and tone of your input, not just keywords. Powered by OpenAI, LangChain, and hosted on Hugging Face Spaces with an interactive Gradio UI.
- ๐ Semantic Search: Finds books based on the meaning of your input using OpenAI embeddings
- ๐ญ Emotion-Aware Filtering: Choose tones like Happy, Sad, Suspenseful, etc.
- ๐ Category-Based Filtering: Refine by genre or theme
- ๐ง LLM-Enhanced Retrieval: Uses LangChain to manage document embeddings
- โก Gradio Interface: Fast and intuitive web-based user interface
- ๐ Hosted on Hugging Face Spaces
- โBooks about overcoming failure with a hopeful endingโ
- โSomething dystopian with a strong female leadโ
- โBooks that make you cry but also inspireโ
- Book Metadata & Descriptions are loaded from a dataset
- Descriptions are embedded using
OpenAIEmbeddings(via LangChain) - A Chroma vector store is created for semantic similarity search
- The user enters a natural language query
- Relevant book descriptions are matched semantically
- Optional filters by category and emotion tone are applied
- Gradio Gallery displays recommended books with thumbnails and summaries
| Layer | Tools/Libraries |
|---|---|
| Language | Python 3 |
| LLM Embedding | OpenAI API (text-embedding-ada-002) |
| Retrieval | LangChain + Chroma + FAISS |
| UI Framework | Gradio (Blocks and Gallery) |
| Hosting | Hugging Face Spaces |
| Data Handling | Pandas, NumPy |
| Environment | Python-dotenv + Hugging Face Secrets |
app.pyโ Main app entry (Gradio + LangChain)requirements.txtโ Dependencies for Hugging Facebooks_with_emotions.csvโ Dataset with book metadatatagged_description.txtโ Description file for embeddingcover-not-found.jpgโ Placeholder for missing thumbnailsREADME.mdโ You're reading it!
๐ Try the App on Hugging Face Spaces
Ram
๐ผ Passionate about NLP, recommendation systems, and building real-world AI solutions.
๐ LinkedIn
