Skip to content

Latest commit

ย 

History

16 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ’Š MediBot Jaipur โ€” Local Medical AI Assistant

Python Mistral LangChain ChromaDB Gradio Offline

๐Ÿค– Ask about Indian medicines + find nearest medical stores in Jaipur โ€” powered by local AI, zero internet needed!

Features โ€ข Demo โ€ข Installation โ€ข Architecture โ€ข Tech Stack โ€ข Datasets


๐ŸŒŸ What is MediBot Jaipur?

MediBot Jaipur is a fully offline, privacy-first Medical AI Assistant that answers questions about 253,973 Indian medicines and helps you find the nearest medical store from 383 verified Jaipur pharmacies โ€” all running locally on your laptop using Mistral 7B.

No API keys. No internet. No data leaving your machine. Just pure AI magic. ๐Ÿ”ฅ


โœจ Features

Feature Description
๐Ÿ’Š 253K+ Medicines Complete A-Z Indian medicine database with prices in โ‚น
๐Ÿ“ 383 Jaipur Stores Find nearest medical stores by area name
๐Ÿง  RAG Architecture Retrieval Augmented Generation for accurate answers
๐Ÿ”’ 100% Offline No internet, no API costs, no data privacy concerns
โšก Fast Search MiniLM embeddings search 323K chunks in milliseconds
๐Ÿ—บ๏ธ Google Maps Links Direct links to stores on Google Maps
๐Ÿ“ž Store Details Phone, timings, delivery, ratings for each store
๐ŸŽจ Beautiful UI Dark-themed Gradio interface with quick-question buttons
๐Ÿค– Mistral 7B Powerful 7B parameter LLM running on local GPU

๐ŸŽฌ Demo

๐Ÿ“ Area: Malviya Nagar
๐Ÿ’Š Question: "medicine for fever"

MediBot โ†’
"For fever, common medicines include:
 1. Paracetamol (500mg) - โ‚น15-30
 2. Dolo 650 - โ‚น30
 3. Calpol - โ‚น25

 Always consult a real doctor before use.

 ๐Ÿฅ Nearby Medical Stores in Malviya Nagar:

 1. Apollo Pharmacy (Malviya Nagar)
    โญ 3.4/5 (302 reviews)
    ๐Ÿ• 7AM - 11PM | โŒ No delivery
    ๐Ÿ“ž 9198488707
    ๐Ÿ—บ๏ธ maps.google.com/?q=26.86,75.81

 2. City Med House (Malviya Nagar)
    โญ 4.7/5 (2790 reviews)
    ๐Ÿ• 7AM - 9PM | ๐Ÿšš Delivery: 5km
    ๐Ÿ“ž 9181639077
    ๐Ÿ—บ๏ธ maps.google.com/?q=26.86,75.80"

๐Ÿš€ Installation

Prerequisites

  • Python 3.10+
  • NVIDIA GPU (8GB+ VRAM recommended)
  • Ollama installed
  • 16GB+ RAM

Step 1 โ€” Clone the repo

git clone https://github.com/Jashanjindal/MediBot.git
cd MediBot

Step 2 โ€” Install dependencies

pip install -r requirements.txt

Step 3 โ€” Pull Mistral model

ollama pull mistral

Step 4 โ€” Download datasets

Download these and place in data/ folder:

Step 5 โ€” Build vectorstore (one time only!)

# Open ingest.ipynb in Jupyter and run all cells
# This takes ~26 minutes โ€” only needed ONCE!
jupyter notebook ingest.ipynb

Step 6 โ€” Launch MediBot!

# Open launch.ipynb and run all 4 cells
jupyter notebook launch.ipynb
# Opens at http://127.0.0.1:7860

๐Ÿ“ Project Structure

MediBot/
โ”‚
โ”œโ”€โ”€ ๐Ÿ““ launch.ipynb          โ† Run this every day! (4 cells, ~2 mins)
โ”œโ”€โ”€ ๐Ÿ“ setup/
โ”‚   โ””โ”€โ”€ ingest.ipynb         โ† Run once to build vectorstore
โ”‚
โ”œโ”€โ”€ ๐Ÿ“ data/
โ”‚   โ”œโ”€โ”€ A_Z_medicines_dataset_of_india.csv
โ”‚   โ”œโ”€โ”€ medDataset_processed.csv
โ”‚   โ””โ”€โ”€ jaipur_medical_stores_ml.xlsx
โ”‚
โ”œโ”€โ”€ ๐Ÿ“ vectorstore/          โ† Auto-generated (not on GitHub)
โ”œโ”€โ”€ ๐Ÿ“„ requirements.txt
โ”œโ”€โ”€ ๐Ÿ“„ .gitignore
โ””โ”€โ”€ ๐Ÿ“„ README.md

๐Ÿง  Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚              USER INPUT                                  โ”‚
โ”‚   Area: "Malviya Nagar"                                 โ”‚
โ”‚   Question: "medicine for fever"                         โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
               โ”‚                          โ”‚
               โ–ผ                          โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚   RAG PIPELINE       โ”‚    โ”‚   LOCATION ENGINE           โ”‚
โ”‚                      โ”‚    โ”‚                             โ”‚
โ”‚  MiniLM Embeddings   โ”‚    โ”‚  Search 383 Jaipur stores   โ”‚
โ”‚         โ†“            โ”‚    โ”‚  by area name / GPS         โ”‚
โ”‚  ChromaDB Search     โ”‚    โ”‚  using GeoPy distance       โ”‚
โ”‚         โ†“            โ”‚    โ”‚         โ†“                   โ”‚
โ”‚  Top 8 relevant      โ”‚    โ”‚  Top 3 nearest stores       โ”‚
โ”‚  medical chunks      โ”‚    โ”‚  with full details          โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
           โ”‚                               โ”‚
           โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                          โ–ผ
            โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
            โ”‚      MISTRAL 7B         โ”‚
            โ”‚  Reads medicine context โ”‚
            โ”‚  + store information    โ”‚
            โ”‚  Generates full answer  โ”‚
            โ”‚  Running on RTX GPU     โ”‚
            โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                         โ–ผ
            โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
            โ”‚      GRADIO UI          โ”‚
            โ”‚  Dark themed chat       โ”‚
            โ”‚  Quick question buttons โ”‚
            โ”‚  Location input box     โ”‚
            โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿ”ง Tech Stack

Component Technology Why
LLM Mistral 7B via Ollama Best 7B model, runs on 8GB VRAM
Embeddings MiniLM (sentence-transformers) 50x faster than LLM embeddings
Vector DB ChromaDB Fast similarity search
Location GeoPy Distance calculation between GPS coordinates
Framework LangChain Connects all AI components
UI Gradio Beautiful dark-themed web interface
Language Python 3.10+ ML ecosystem
GPU NVIDIA RTX 4050 Local GPU inference

๐Ÿ“Š Datasets

Dataset 1 โ€” A-Z Medicines of India
โ”œโ”€โ”€ Total medicines    : 253,973
โ”œโ”€โ”€ Key columns        : name, price(โ‚น), manufacturer, composition
โ””โ”€โ”€ Source             : Kaggle

Dataset 2 โ€” Medical Q&A
โ”œโ”€โ”€ Total Q&A pairs    : 16,407
โ”œโ”€โ”€ Key columns        : question, answer, type
โ””โ”€โ”€ Source             : Kaggle

Dataset 3 โ€” Jaipur Medical Stores
โ”œโ”€โ”€ Total stores       : 383
โ”œโ”€โ”€ Key columns        : name, address, locality, lat/lon,
โ”‚                        phone, timings, delivery, rating
โ””โ”€โ”€ Coverage           : All major Jaipur localities

Combined Knowledge Base
โ”œโ”€โ”€ Total documents    : 270,380
โ”œโ”€โ”€ After chunking     : 323,516 chunks
โ””โ”€โ”€ Embedding model    : all-MiniLM-L6-v2

๐Ÿ“ Jaipur Areas Covered

Malviya Nagar    Vaishali Nagar    C-Scheme
Mansarovar       Tonk Road         Ajmer Road
Sanganer         Jagatpura         Pratap Nagar
Civil Lines      Raja Park         Shyam Nagar
Nirman Nagar     Sodala            Vidhyadhar Nagar
...and many more!

๐Ÿ’ก Sample Questions

๐Ÿ’Š Medicine Info
โ†’ "What is Paracetamol used for?"
โ†’ "What medicines contain Amoxicillin?"
โ†’ "Composition of Augmentin 625?"

๐Ÿ’ฐ Pricing
โ†’ "Price of Dolo 650 in India?"
โ†’ "Cheapest fever medicines?"

โš ๏ธ Side Effects
โ†’ "Side effects of Azithromycin?"
โ†’ "Is Ibuprofen safe for children?"

๐Ÿ“ With Location (Jaipur specific)
โ†’ Area: Vaishali Nagar | "medicine for cold"
โ†’ Area: C-Scheme | "where can I get Metformin?"
โ†’ Area: Mansarovar | "nearest 24x7 pharmacy?"

๐Ÿ—“๏ธ Daily Usage

# Step 1 โ€” Start Ollama (keep terminal open)
ollama serve

# Step 2 โ€” Open launch notebook
jupyter notebook launch.ipynb

# Step 3 โ€” Run All Cells (Ctrl+F9)
# Takes ~2 minutes total

# Step 4 โ€” Open browser
# Go to http://127.0.0.1:7860

๐Ÿ† What Makes This Special

  • โœ… No API costs โ€” completely free to run forever
  • โœ… Privacy first โ€” your medical questions never leave your laptop
  • โœ… Indian medicine focused โ€” built specifically for Indian medicines with โ‚น prices
  • โœ… Jaipur specific โ€” 383 verified local pharmacies with real contact details
  • โœ… Location aware โ€” finds nearest store in your area instantly using GPS data
  • โœ… Massive knowledge base โ€” 323K chunks of medical knowledge
  • โœ… Production ready UI โ€” looks and feels like a real product
  • โœ… Fully reproducible โ€” anyone can clone and rebuild in ~30 minutes

โš ๏ธ Disclaimer

MediBot Jaipur is for educational purposes only. Always consult a qualified medical professional before taking any medicine. Store information may not be 100% accurate โ€” always verify before visiting. The creators are not responsible for any medical decisions made based on this tool.


๐Ÿ‘จโ€๐Ÿ’ป Author

Jashan Jindal


๐Ÿ“œ License

MIT License โ€” free to use, modify, and distribute!


Built with โค๏ธ in Jaipur, Rajasthan ๐Ÿ‡ฎ๐Ÿ‡ณ

If this helped you, give it a โญ on GitHub!

"Built a complete offline Medical AI with RAG architecture, local LLM inference, and location-based pharmacy search โ€” running 100% on my laptop!"

About

A fully offline Medical AI Assistant About 253,973 Indian medicines with data of Local Medical store of Jaipur

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages