Skip to content

yashh2417/IntelliShelf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

26 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ›οΈ IntelliShelf – AI-Powered Smart Instrument Store 🧠🎸

Entire Pipeline

IntelliShelf Pipeline

Welcome to IntelliShelf, a full-stack AI-powered demo platform that combines Computer Vision, LLMs, and RAG to deliver a futuristic musical instrument e-commerce experience. From automated defect detection to LLM-generated descriptions and FAQ-based chatbot assistance, everything is built with modularity and scalability in mind.


πŸ”§ Key Features

Capability Powered By
πŸ–ΌοΈ Product Type Classification PyTorch (ResNet-based CNN)
πŸ” Defect Detection YOLOv8 (Ultralytics)
πŸ“ Auto Description Generation Google Gemini API
πŸ’¬ Buyer Chatbot (Policies/FAQs) LangChain + Chroma + Gemini (RAG)
πŸ“¦ Image Upload + Storage FastAPI + PIL
πŸ›’ Return Eligibility Detection Vision + Business Rule Logic
πŸ–₯️ Web Interface FastAPI + Jinja2 Templates + HTML/CSS
☁️ Container Docker

πŸ—‚οΈ Project Structure


intellishelf/
β”œβ”€β”€ store/
β”‚   β”œβ”€β”€ main.py                # FastAPI app
β”‚   β”œβ”€β”€ templates/             # HTML templates (Jinja2)
β”‚   β”œβ”€β”€ static/                # CSS and static assets
β”‚   └── ...
β”œβ”€β”€ product\_db/
β”‚   β”œβ”€β”€ product\_data.json      # Stores product catalog
β”‚   └── uploaded\_images/       # Image storage
β”œβ”€β”€ chromadb/                  # Vector DB for RAG
β”œβ”€β”€ model/
β”‚   β”œβ”€β”€ classify.pth           # PyTorch classifier
β”‚   └── YOLOv8 weights         # YOLOv8 defect detector
└── runs/                      # YOLO training artifacts


πŸš€ Live Demo Walkthrough

1. Upload Product Image

Upload Screenshot

  • Upload any musical instrument image.
  • Fill in product specifications.
  • System detects:
    • 🎡 Instrument type
    • 🧯 Whether it is defective

2. Description & Feature Generation

Clean Image

Generated Description

Defected Image

Found Defect

  • Based on the uploaded specs, Gemini LLM creates:
    • πŸ“ Human-readable product description
    • βœ… A structured list of key features

3. Product Catalog Page

Product Grid

  • View uploaded products.
  • Each item has:
    • Thumbnail
    • Class, Features, Description

4. Chatbot – Return & Policy Help

Chatbot UI

  • Powered by:
    • πŸ” Chroma (vector DB)
    • πŸ€– Gemini + LangChain (RAG)
  • Ask questions like:
    • β€œCan I return a damaged tabla?”
    • β€œHow long is the warranty?”

5. Return Eligibility Checker

Return Eligibility Checker

Return Status

Return Rejected-clean product

Return Rejected-clean product

Return Rejected-defected product

Return Rejected-defected product

  • Upload product photo + purchase age (in days)
  • Uses:
    • CV + business logic
    • To verify if return is valid
    • In case of defect β†’ prompts inspection/replacement

🧠 How It Works

πŸ” Computer Vision

  • Instrument Classification: ResNet‑based model trained on 5 categories: ['flute', 'guitar', 'tabla', 'violin', 'drum']

  • Defect Detection: YOLOv8 trained on custom dataset:

    • Detects surface damage, broken parts, or wear

✨ Description Generation

  • Input: Specs like "9 inches, steel body, 6 holes"
  • Output:
{
  "description": "This stylish steel flute features a sleek black finish...",
  "features": ["9 inches", "6 holes", "black color", "steel body"]
}
  • Powered by Google Gemini LLM API

πŸ”— RAG for Customer Chat

  • Embedded:

    • πŸ“ Store Policies (PDF)
    • ❓ FAQs (JSON)
  • Vectorized using Google GenerativeAI Embeddings

  • Indexed with Chroma

  • Retrieved via LangChain ConversationalRetrievalChain


πŸ› οΈ Setup Instructions

1. Clone & Install

git clone https://github.com/yourname/intellishelf.git
cd intellishelf/store
pip install -r requirements.txt

2. Environment

Create a .env file:

GOOGLE_API_KEY=your_google_gemini_key

3. Run FastAPI

uvicorn main:app --reload

Visit πŸ‘‰ http://localhost:8000


🐳 Docker Usage

This app is fully containerized and ready to deploy via Docker.

🧱 Build & Push Docker Image (for Developers)

# Build image
docker build -t yashh2417/intellishelf-store:latest .

# Login to Docker Hub
docker login

# Push to Docker Hub
docker push yashh2417/intellishelf-store:latest

πŸƒ Run via Docker (Local)

docker run -p 8000:8000 \
  -e GOOGLE_API_KEY=your_gemini_api_key \
  yashh2417/intellishelf-store:latest
Visit πŸ‘‰ http://localhost:8000

☁️ Cloud Deployment (Next Step)

Once image is pushed to Docker Hub, deploy using:

βœ… Option 1: AWS Lightsail (Recommended for ARM64)

  • Create Container Service

  • Use image: yashh2417/intellishelf-store:latest

  • Expose port 8000

  • Add GOOGLE_API_KEY as secret environment variable

βœ… Option 2: Oracle Cloud (Always Free ARM VM + CapRover)

  • Launch Ampere VM

  • Install Docker + CapRover

  • Use your DockerHub image to deploy

βœ… Option 3: Azure Container Apps

  • Supports private/public registry

  • Auto‑restart, logging, HTTPS support

πŸ’‘ You must ensure platform = linux/arm64 for all deployments (check Docker image architecture)


πŸ“ˆ Future Roadmap

πŸ” Feedback Loop

Let users rate:

  • πŸ€– Description quality
  • πŸ“· Detection accuracy
  • 🀝 RAG answers

Use feedback to:

  • Fine-tune prompts
  • Improve data augmentation
  • Retrain models periodically

πŸ’³ Monetization / Real Usage

If planning a real launch:

  • πŸ’Έ Add Stripe/PayPal checkout

  • πŸ“Š Build seller dashboard:

    • Upload stock
    • Track defects
  • πŸ“¬ Enable email alerts for:

    • Returns
    • Claim status

πŸ§ͺ Tech Stack

  • Frontend: HTML + Jinja2 + CSS
  • Backend: FastAPI
  • LLM: Gemini 1.5 Flash
  • RAG: LangChain + Chroma
  • Embedding: GoogleGenerativeAIEmbeddings
  • Database: JSON + ChromaDB
  • CV Models: YOLOv8 + PyTorch CNN
  • Container: Docker (ARM64)
  • Deployment: Docker Hub β†’ AWS/Oracle/Railway

πŸ™ Acknowledgements


πŸ“¬ Contact


⚠️ Note: This is a demo project. All models are trained on small sample datasets and not production-hardened. Gemini API usage is rate-limited under personal key.


About

IntelliShelf, a full-stack AI-powered demo platform that combines Computer Vision, LLMs, and RAG to deliver a futuristic musical instrument e-commerce experience. From automated defect detection to LLM-generated descriptions and FAQ-based chatbot assistance, everything is built with modularity and scalability in mind.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors