A modern book recommendation system that combines traditional Machine Learning with Large Language Models to provide personalized classic literature recommendations.
- Dual Recommendation Approaches:
- Questionnaire-based recommendations using SVM
- Natural language chat interface using BERT embeddings
- Interactive Web Interface
- Vector-based Book Matching
- SQLite Database with Vector Store
- Backend: Python, Flask
- ML/AI:
- SVM for questionnaire processing
- BERT embeddings for similarity matching
- Ollama (llama3.2:3b) for chat interface
- Database: SQLite with FAISS vector store
- Frontend: HTML, CSS, JavaScript
- Python 3.8+
- Ollama installed and running
- SQLite3
- Clone the repository
git clone https://github.com/yourusername/classy_books_web.git
cd classy_books_web
- Create and activate virtual environment
python -m venv venv
source venv/bin/activate # Linux/Mac
venv\Scripts\activate # Windows
- Install dependencies
pip install -r requirements.txt
- Start Ollama service
ollama run llama3.2:3b
- Run the application
python app_CCB.py
-
Questionnaire-Based Recommendations:
- Navigate to
/form
- Answer 13 questions about your preferences
- Get personalized book recommendations
- Navigate to
-
Chat Interface:
- Click the chat icon or go to
/chat
- Describe your interests or ask for recommendations
- Get AI-powered suggestions with similarity scores
- Click the chat icon or go to
-
Database Portal:
- Access
/db_portal
for database exploration - Execute custom queries
- View book information and vectors
- Access
classy_books_web/
├── app_CCB.py # Main Flask application
├── ML_algorithm_CCB.py # SVM implementation
├── nlp_components/ # NLP and chat functionality
├── static/ # CSS, JS, and assets
├── templates/ # HTML templates
└── my_database.db # SQLite database
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Shubham Dalvi - @ShubhamDalvi1999
- BERT model for embeddings
- Ollama for LLM capabilities
- FAISS for vector similarity search
- Flask for web framework
If you encounter any issues with the LangChain packages, you can check your installed versions:
pip show langchain-community
pip show langchain-ollama
Make sure these versions are compatible with your Python environment.