https://github.com/bharath-tars/hemamind
HemaMind - AI Agent to analyze blood reports and provide detailed health insights
https://github.com/bharath-tars/hemamind
ai-agents analytics generativeai groq healthcare
Last synced: 9 months ago
JSON representation
HemaMind - AI Agent to analyze blood reports and provide detailed health insights
- Host: GitHub
- URL: https://github.com/bharath-tars/hemamind
- Owner: Bharath-tars
- License: mit
- Created: 2025-10-08T03:39:19.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-10-08T04:19:39.000Z (9 months ago)
- Last Synced: 2025-10-08T05:41:42.505Z (9 months ago)
- Topics: ai-agents, analytics, generativeai, groq, healthcare
- Language: Python
- Homepage:
- Size: 3.58 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# π©Ί HemaMind ("Hema" = Blood, + "Mind" = Intelligence)
AI Agent to analyze blood reports and provide detailed health insights.
Features |
Tech Stack |
Installation |
## Example Result

## π Features
- Intelligent agent-based architecture with multi-model cascade system
- In-context learning from previous analyses and knowledge base building
- Medical report analysis with personalized health insights
- PDF upload, validation and text extraction (up to 20MB)
- Supports both text-parsable documents and scanned documents (scanned files may take longer to process since GPU acceleration isnβt available)
- Secure user authentication and session management
- Session history with report analysis tracking
- Modern, responsive UI with real-time feedback
## π οΈ Tech Stack
- **Frontend Framework**: Streamlit
- **AI Integration**: Multi-model architecture via Groq
- Primary: meta-llama/llama-4-maverick-17b-128e-instruct
- Secondary: llama-3.3-70b-versatile
- Tertiary: llama-3.1-8b-instant
- Fallback: llama3-70b-8192
- **Database**: Supabase
- **PDF Processing**: PDFPlumber
- **Authentication**: Supabase Auth
## π Installation
#### Requirements π
- Python 3.8+
- Streamlit 1.30.0+
- Supabase account
- Groq API key
- PDFPlumber
- Python-magic-bin (Windows) or Python-magic (Linux/Mac)
- streamlit>=1.42.0
- Pillow
- Easyocr
- Numpy
#### Getting Started π
1. Clone the repository:
```bash
git clone https://github.com/Bharath-tars/HemaMind.git
cd HemaMind
```
2. Install dependencies:
```bash
pip install -r requirements.txt
```
3. Required environment variables (in `.streamlit/secrets.toml`):
```toml
SUPABASE_URL = "your-supabase-url"
SUPABASE_KEY = "your-supabase-key"
GROQ_API_KEY = "your-groq-api-key"
```
4. Set up Supabase database schema:
The application requires the following tables in your Supabase database:

You can use the SQL script provided at `public/db/script.sql` [link] to set up the required database schema.
(PS: You can turn off the email confimation on signup in Supabase settings -> signup -> email)
5. Run the application:
```bash
streamlit run src\main.py
```
## π Project Structure
```
hia/
βββ requirements.txt
βββ README.md
βββ src/
β βββ main.py # Application entry point
β βββ auth/ # Authentication related modules
β β βββ auth_service.py # Supabase auth integration
β β βββ session_manager.py # Session management
β βββ components/ # UI Components
β β βββ analysis_form.py # Report analysis form
β β βββ auth_pages.py # Login/Signup pages
β β βββ footer.py # Footer component
β β βββ sidebar.py # Sidebar navigation
β βββ config/ # Configuration files
β β βββ app_config.py # App settings
β β βββ prompts.py # AI prompts
β βββ services/ # Service integrations
β β βββ ai_service.py # AI service integration
β βββ agents/ # Agent-based architecture components
β β βββ agent_manager.py # Agent management
β β βββ model_fallback.py # Model fallback logic
β βββ utils/ # Utility functions
β βββ validators.py # Input validation
β βββ pdf_extractor.py # PDF processing
```
## π₯ Contributing
Contributions are welcome! Please read our [Contributing Guidelines](CONTRIBUTING.md) for details on how to submit pull requests, the development workflow, coding standards, and more.
We appreciate all contributions, from reporting bugs and improving documentation to implementing new features.
## π License
This project is licensed under the MIT License - see the [LICENSE](https://github.com/Bharath-tars/HemaMind/blob/main/LICENSE) file for details.
## πββοΈ Author
Created by [Sudarsanam Bharath](https://b4rpro.netlify.app)