An intelligent, futuristic healthcare assistant powered by a custom fine-tuned Large Language Model (Llama-3).
Vitalis AI is a next-generation, clinical-grade healthcare chatbot designed to democratize access to medical information. Traditional healthcare can often be slow and inaccessible, leaving patients anxious while waiting for basic symptom analysis. Vitalis AI bridges this gap by providing immediate, highly accurate, and empathetic medical insights directly from your browser.
Built with a stunning, responsive glassmorphism UI, the application feels premium, intuitive, and deeply interactive. Under the hood, the brain of Vitalis is powered by a custom fine-tuned Llama-3 (8B) Large Language Model. By specifically training the model on the comprehensive ChatDoctor dataset using cutting-edge Unsloth optimization techniques, Vitalis transcends generic AI responses. It acts as a specialized medical assistant capable of interpreting symptoms, asking dynamic follow-up questions, supporting multiple languages in real-time, and generating personalized daily health tips.
Whether you are logging a minor headache using our interactive human body map, uploading clinical images for context, or exporting a diagnostic session as a PDF for your doctor, Vitalis AI is engineered to be the ultimate personal health hub.
- πΈ Dashboard Preview
- β¨ Core Features
- π οΈ Tech Stack & Architecture
- π Project Structure
- π Installation & Setup
- π‘ Usage Guide
- π€ Contributing
- π License
| Feature | Description |
|---|---|
| π Secure Authentication | Google Sign-In powered by Firebase Authentication for seamless onboarding. |
| ποΈ Persistent Data | Saves user profiles and demographic data using NeonDB (Serverless PostgreSQL). |
| ποΈ Session Management | Start new consultations, view past history, and rename/delete previous chat sessions. |
| π§ Custom Healthcare AI | Powered by a fine-tuned Llama-3 8B model (trained via Unsloth on the ChatDoctor dataset). |
| βοΈ Serverless Inference | AI model compressed to GGUF format and hosted 24/7 on Hugging Face Spaces via FastAPI. |
| π§ Interactive Body Map | Pinpoint exactly where it hurts using a clickable SVG human anatomy map. |
| π‘οΈ Dynamic Pain Scale | Log symptom severity with a visual 1-10 slider featuring animated emoji feedback. |
| π¬ Smart Suggestions | Context-aware follow-up questions generated to guide the conversation. |
| π€ Voice Input | Speak directly to the AI for a hands-free diagnostic experience using the Web Speech API. |
| β‘ Quick Prompts | Instantly analyze common issues (Headache, Fever, Cold, etc.) with a single click. |
| π Multilingual Support | Chat seamlessly in English, Spanish, French, Hindi, Chinese, or Arabic. |
| π Dynamic Theme | Beautiful dark mode (Carbon Black) and sleek light mode (Porcelain Base) with smooth CSS transitions. |
| π¨οΈ Export Session | Download your entire diagnostic session as a clean, formatted PDF for personal records. |
- HTML5 & CSS3: Semantic markup, CSS Custom Properties, Glassmorphism aesthetics, and keyframe animations.
- Vanilla JavaScript (ES6+): Modular DOM manipulation, asynchronous API handling, and event-driven architecture.
- Firebase: Google OAuth Authentication logic.
- Vercel Serverless Functions: Node.js API routes handling business logic (
/api/chat,/api/getHistory, etc.). - NeonDB: Serverless PostgreSQL database for persistent user data and chat session storage.
- Base Model: Meta Llama-3 (8 Billion Parameters).
- Fine-tuning: LoRA fine-tuning using Unsloth & Google Colab on the Hugging Face
ChatDoctordataset. - Inference:
llama.cpp(GGUF compression) hosted via FastAPI and Uvicorn. - AI Hosting: Hugging Face Spaces (Docker environment) for a free, 24/7 endpoint.
Vitalis-AI/
βββ api/ # Vercel Serverless Functions (Node.js/Postgres/Fetch)
β βββ chat.js # Proxies chat requests to Hugging Face Space
β βββ getUser.js # Fetches user demographics from NeonDB
β βββ saveUser.js # Saves new Google Auth users into NeonDB
β βββ getHistory.js # Fetches past chat sessions and messages
β βββ saveMessage.js # Saves chat messages with session IDs
β βββ renameChat.js # Renames an existing chat session
β βββ deleteChat.js # Deletes an entire chat session
βββ assets/ # Logos, demo GIFs, and screenshot images
βββ index.html # Main UI dashboard and modal layouts
βββ script.js # Core frontend logic, Firebase Auth, and DOM interactions
βββ style.css # Responsive styles, theme variables, and animations
βββ package.json # Backend dependencies (pg, dotenv)
βββ vercel.json # Deployment configuration (optional)
βββ README.md # Project documentation
git clone https://github.com/Ritik0102-bit/Vitalis-AI.git
cd Vitalis-AI
npm installCreate a .env file in the root directory and add your credentials:
DATABASE_URL="postgresql://<user>:<password>@<neon-host>/neondb?sslmode=require"
CUSTOM_LLM_URL="https://your-huggingface-space.hf.space/chat"(Ensure your Firebase configuration keys are updated in index.html).
Because this project utilizes Serverless APIs, you must run it using the Vercel CLI:
npm i -g vercel
vercel devThe application will now be available at http://localhost:3000.
To deploy your application publicly:
vercel --prodNote: Make sure to add your Environment Variables to the Vercel Dashboard, and whitelist your new Vercel domain in your Firebase Auth settings!
- Sign In: Authenticate securely using the Google Sign-In popup.
- Onboarding: Enter your Age and Gender upon your first login.
- Describe Symptoms: Type your symptoms into the chat box, click the Microphone icon to dictate them, or use the Quick Action Prompts.
- Visual Tools: Utilize the Child Icon for the Body Map or the Thermometer for the pain scale.
- Manage Consultations: Navigate between past sessions using the left sidebar. Hover over any past session to rename or delete it.
- Interact: Receive hyper-accurate, empathetic medical responses generated directly from the Custom Llama-3 AI server.
Contributions, issues, and feature requests are highly appreciated! Feel free to check out the issues page.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Distributed under the MIT License. See LICENSE for more information.
Ritik Rana
- GitHub: @Ritik0102-bit
