| title | NewGenHealthAI |
|---|---|
| emoji | 🩺 |
| colorFrom | blue |
| colorTo | green |
| sdk | docker |
| pinned | false |
| app_port | 7860 |
An AI-powered medical assistant with a FastAPI backend and a React frontend for conversational clinical guidance, session-based chat, and image-based disease analysis. Deployed and publicly accessible through Hugging Face Spaces.
NewGenHealthAI is a full-stack healthcare AI application designed to support medical interaction workflows through:
- conversational AI assistance
- image-based disease analysis
- session-based chat history
- diagnostics and model inspection utilities
- containerized deployment with Docker
The project is organized as a monorepo with separate backend and frontend applications.
NewGenHealthAI/
├── backend/
│ ├── app/
│ ├── test_images/
│ ├── tests/
│ ├── .flake8
│ ├── Dockerfile
│ ├── inspect_models.py
│ ├── pyproject.toml
│ ├── pytest.ini
│ ├── requirements.txt
│ ├── test_api.py
│ └── test_clip_routing.py
├── frontend/
│ ├── public/
│ ├── src/
│ ├── .gitignore
│ ├── Dockerfile
│ ├── README.md
│ ├── eslint.config.js
│ ├── index.html
│ ├── nginx.conf
│ ├── package-lock.json
│ ├── package.json
│ ├── postcss.config.js
│ ├── tailwind.config.js
│ └── vite.config.js
├── .env.example
├── Dockerfile
├── check_model_on_image.py
├── diagnose_env.py
├── run.py
├── run_medai.bat
└── .gitignore
- AI-powered medical assistant interface
- FastAPI backend API
- React + Vite frontend
- Session-based conversation history
- Medical image analysis endpoint
- Model diagnostics endpoint
- Local testing utilities for medical images
- Docker support for deployment
- Environment-based configuration
- Python
- FastAPI
- Uvicorn
- LangChain / LangGraph
- ChromaDB
- Sentence Transformers
- Hugging Face Transformers
- PyTorch
- SQLAlchemy
- React
- Vite
- Tailwind CSS
- DaisyUI
Create a .env file in the project root based on .env.example.
Required variables include:
GROQ_API_KEY=your_groq_api_key_here
TAVILY_API_KEY=your_tavily_api_key_here
SESSION_SECRET_KEY=your_session_secret_key_hereOptional path overrides may also be configured for logs, database, vector store, and PDF sources.
git clone https://github.com/sg721642/NewGenHealthAI.git
cd NewGenHealthAIcd backend
python -m venv .venvActivate the virtual environment:
Windows
.venv\Scripts\activateLinux / macOS
source .venv/bin/activateInstall dependencies:
pip install -r requirements.txtOpen a new terminal:
cd frontend
npm installFrom the project root folder:
python run.pyThis script:
- creates a virtual environment if needed
- installs backend dependencies
- installs frontend dependencies
- starts the backend on port
8000 - waits for the backend health endpoint
- launches the frontend development server
cd backend
uvicorn app.main:app --reload --port 8000cd frontend
npm run devSome important backend routes include:
GET /api/v1/health— backend health checkGET /api/v1/diagnostics— loaded model diagnosticsPOST /api/v1/analyze-image— upload an image for analysis
Depending on your backend router definitions, additional chat and session endpoints are also available.
Run pytest inside the backend folder:
cd backend
pytestcd backend
python test_api.pycd backend
python test_clip_routing.pyThese scripts test image classification and verify that domain routing works correctly for sample images such as skin, xray, and retina inputs.
Dockerfiles are included for:
- project root
- backend
- frontend
You can use them to build and containerize the entire application or individual services depending on your deployment setup.
The frontend is built with React and Vite and provides:
- chat-based interaction
- conversation history
- a clean medical assistant interface
To create a production build:
cd frontend
npm run buildTo preview the production build locally:
npm run previewThe project also includes utility scripts such as:
check_model_on_image.py— test model behavior on a single imagediagnose_env.py— inspect environment setup and issuesinspect_models.py— inspect backend model loading/configurationrun_medai.bat— Windows launcher helper
- AI-assisted symptom guidance
- educational medical assistant demos
- image-based disease analysis workflows
- research prototypes for healthcare AI systems
This project is intended for educational, research, and prototype purposes only.
It must not be used as a replacement for licensed medical diagnosis, treatment, or professional clinical judgment.
- Satyam Gupta
- Khagesh Ranjan
- Sudipto Ghosh
- Ajitesh Baghel
- Yuvraj Singh
Add your preferred license here, for example:
MIT License
If you have not chosen one yet, create a LICENSE file before publishing for open-source reuse.
Special thanks to the mentor, contributors, and open-source communities behind FastAPI, React, Vite, Hugging Face, LangChain, and related AI tooling.