MedAI is a personal health assistant powered by Langflow and Streamlit. It uses an advanced AI agent hosted on DataStax Astra DB to analyze user symptoms and health data, providing preliminary insights and predictions regarding chronic conditions.
The application features a modern, medical-themed UI with a dynamic "Hero-to-Chat" interface that adapts as you interact with it, ensuring a professional and reassuring user experience.
- Intelligent Analysis: Powered by a custom Langflow agent running on DataStax Astra DB.
- Dynamic UI: Starts as a search-engine style "Hero" interface and seamlessly transitions to a scrollable chat interface upon interaction.
- Medical Aesthetics: Clean, reassuring design with glassmorphism effects, medical color palettes (Teal/Blue/White), and professional typography.
- Secure: Uses Streamlit Secrets management to protect sensitive API keys.
- Real-time Interaction: Instant responses to health queries and symptom descriptions.
Follow these steps to run MedAI locally on your machine.
Open your terminal and run:
git clone [https://github.com/YOUR_USERNAME/medai-assistant.git](https://github.com/YOUR_USERNAME/medai-assistant.git)
cd medai-assistant
It is best practice to run Python apps in a virtual environment to avoid conflicts.
# Windows
python -m venv venv
venv\Scripts\activate
# Mac/Linux
python3 -m venv venv
source venv/bin/activate
Install the required Python packages listed in requirements.txt:
pip install -r requirements.txt
Important: This app requires a Langflow API Token to function. For security, this token is not stored in the code. You must set it up locally.
- Create a folder named
.streamlitin the root directory of the project. - Inside that folder, create a file named
secrets.toml. - Add your token inside the file:
# .streamlit/secrets.toml
LANGFLOW_TOKEN = "Your_AstraCS_Token_Here"
(Note: If you are deploying to Streamlit Cloud, add this secret in the "Advanced Settings" of your dashboard).
Launch the application:
streamlit run app.py
The app will open automatically in your default browser at http://localhost:8501.
medai-assistant/
├── app.py # The main Streamlit application logic and UI
├── requirements.txt # List of Python dependencies
├── .gitignore # Config to keep secrets and system files out of GitHub
├── .streamlit/ # Streamlit configuration folder
│ ├── config.toml # UI Theme configuration (Light mode force)
│ └── secrets.toml # API Keys (Local only - DO NOT COMMIT)
└── README.md # Project documentation
- Frontend: Streamlit (Python)
- Backend Logic: Langflow
- Database/Hosting: DataStax Astra DB
- Language: Python 3.9+
MedAI is an AI prototype designed for educational and informational purposes only.
It is not a substitute for professional medical advice, diagnosis, or treatment. Always seek the advice of your physician or other qualified health provider with any questions you may have regarding a medical condition. Never disregard professional medical advice or delay in seeking it because of something you have read on this application.