File size: 3,077 Bytes
a69ba3b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2d13434
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
---
title: Semantic Book Recommender
emoji: πŸ“Š
colorFrom: indigo
colorTo: yellow
sdk: gradio
sdk_version: 5.25.2
app_file: app.py
pinned: false
license: mit
short_description: A Semantic Book Recommendation System using LLM.
---

Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference

# Semantic Book Recommender

A semantic-based book recommendation system leveraging modern NLP techniques to provide context-aware suggestions.

![Screenshot 2025-04-17 232446](https://github.com/user-attachments/assets/045d2c52-3766-41df-86db-90d71b94b40f)

## 🧠 Project Overview

This project explores the application of Natural Language Processing (NLP) and Large Language Models (LLMs) in building a semantic book recommender system. The system goes beyond traditional keyword-based recommendations by understanding the contextual meaning of book descriptions and user preferences.

## πŸ“ Project Structure

- **`data/`**: Contains the dataset used for analysis and model training.
- **`step_01_EDA.ipynb`**: Performs Exploratory Data Analysis to understand data distribution and key features.
- **`step_02_Vector_Search.ipynb`**: Implements vector-based search using sentence embeddings to find semantically similar books.
- **`step_03_Zero_Shot_Classification.ipynb`**: Applies zero-shot classification to categorize books without labeled data, utilizing pre-trained LLMs.
- **`step_04_Sentiment_Analysis.ipynb`**: Conducts sentiment analysis on book reviews to gauge reader opinions.
- **`step_05_Gradio_Dashboard.py`**: Develops an interactive dashboard using Gradio for users to input preferences and receive recommendations.
- **`requirements.txt`**: Lists all Python dependencies required to run the project.

## πŸ” Key Features

- **Semantic Search**: Utilizes sentence embeddings to capture the semantic meaning of book descriptions, enabling more accurate recommendations.
- **Zero-Shot Classification**: Employs pre-trained LLMs to classify books into genres or categories without the need for labeled training data.
- **Sentiment Analysis**: Analyzes user reviews to understand the general sentiment towards books, aiding in recommendation decisions.
- **Interactive Dashboard**: Provides a user-friendly interface for users to input their preferences and receive tailored book suggestions.

## πŸš€ Getting Started

1. **Clone the repository**:
   ```bash
   git clone https://github.com/YuITC/Semantic-Book-Recommender.git
   cd Semantic-Book-Recommender
   ```

2. **Install dependencies**:
   ```bash
   pip install -r requirements.txt
   ```

3. **Run the Gradio dashboard**:
   ```bash
   python step_05_Gradio_Dashboard.py
   ```

## πŸ“œ License
This project is licensed under the MIT License – feel free to modify and distribute it as needed.

## 🀝 Acknowledgments
If you find this project useful, consider ⭐️ starring the repository or contributing to further improvements!

## πŸ“¬ Contact
For any questions or collaboration opportunities, feel free to reach out:

πŸ“§ Email: [email protected]