Skip to content

ShubhamDalvi1999/Local-Gen-AI-recommendation-System

Repository files navigation

Classy Books Web: AI-Powered Book Recommendation System

A modern book recommendation system that combines traditional Machine Learning with Large Language Models to provide personalized classic literature recommendations.

🚀 Features

  • 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

🛠️ Tech Stack

  • 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

📋 Prerequisites

  • Python 3.8+
  • Ollama installed and running
  • SQLite3

🔧 Installation

  1. Clone the repository
git clone https://github.com/yourusername/classy_books_web.git
cd classy_books_web
  1. Create and activate virtual environment
python -m venv venv
source venv/bin/activate  # Linux/Mac
venv\Scripts\activate     # Windows
  1. Install dependencies
pip install -r requirements.txt
  1. Start Ollama service
ollama run llama3.2:3b
  1. Run the application
python app_CCB.py

💡 Usage

  1. Questionnaire-Based Recommendations:

    • Navigate to /form
    • Answer 13 questions about your preferences
    • Get personalized book recommendations
  2. Chat Interface:

    • Click the chat icon or go to /chat
    • Describe your interests or ask for recommendations
    • Get AI-powered suggestions with similarity scores
  3. Database Portal:

    • Access /db_portal for database exploration
    • Execute custom queries
    • View book information and vectors

🏗️ Project Structure

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

🤝 Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.

👤 Contact

Shubham Dalvi - @ShubhamDalvi1999

🙏 Acknowledgments

  • BERT model for embeddings
  • Ollama for LLM capabilities
  • FAISS for vector similarity search
  • Flask for web framework

🔍 Troubleshooting

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.

About

Book recomendation system using Traditional ML and Ollama model

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published