A Local, Privacy-First AI Assistant for Elderly Users
The AI Medicine Label Explainer is a student-level project designed to help elderly users or people with low literacy understand complex medicine labels. It takes a photo of a medicine bottle, reads the text using OCR (Optical Character Recognition), and uses a Local LLM (Large Language Model) to explain it in simple, plain English or Tamil.
Key Goals:
- Simplicity: No complex medical jargon.
- Privacy: Runs 100% offline. No health data is sent to the cloud.
- Accessibility: Large fonts, simple UI, and Text-to-Speech (TTS) support.
This project uses Free and Open-Source tools:
- Language: Python
- Frontend: Streamlit
- OCR Engine: Tesseract-OCR (via
pytesseract) - AI Model: Ollama (running
mistralorllama3) - Text-to-Speech:
pyttsx3(Offline)
app.py: The main application file containing the UI and logic.ocr_module.py: Handles image processing and text extraction.simplify_module.py: Connects to the local AI model to simplify text.tts_module.py: Converts the simplified text into audio.demo_module.py: Manages the built-in demo mode using sample assets.assets/: Contains sample images for testing.
Ensure you have Python installed. You also need these two external tools:
-
Tesseract OCR:
- Download and install from UB-Mannheim/tesseract.
- Important: Add the installation path (e.g.,
C:\Program Files\Tesseract-OCR) to your System PATH variable.
-
Ollama:
- Download from ollama.com.
- Install and run
ollama servein a terminal window. - Pull the model we use:
ollama pull mistral
Open your terminal in this project folder and run:
pip install -r requirements.txt- Make sure Ollama is running in a separate terminal (
ollama serve). - Run the application:
streamlit run app.py
- The app will open in your browser (usually at
http://localhost:8501).
- Select Language: Choose English or Tamil from the top menu.
- Try Demo: Click the "Try Demo" tab and hit "Load & Run Demo Image". The app will automatically process the sample medicine label.
- Upload Your Own: detailed Check the "Upload Image" tab to upload a photo (
.jpg,.png) of any medicine label. - Read Out Loud: Scroll to the bottom and click the "🔊 Read Out Loud" button to hear the explanation.
This application is for educational purposes only.
- It explains only the text written on the label.
- It does not provide medical advice, diagnosis, or treatment.
- Always consult a doctor or pharmacist for medical concerns.