DiagnoCrew is a medical diagnostic assistant powered by AI agents. It uses a crew of agents to analyze patient symptoms, medical history, and lab results to provide a comprehensive diagnostic report.
Please download and view the demo video at : Demo Video
-
Open a terminal or command prompt.
-
Clone the repository to your local machine:
git clone https://github.com/your-username/DiagnoCrew.git
-
Navigate to the project directory:
cd DiagnoCrew
-
Create a virtual environment in the project directory:
python -m venv .venv
-
Activate the virtual environment:
- On Windows:
.venv\Scripts\activate
- On macOS/Linux:
source .venv/bin/activate
You should see
(.venv)
at the beginning of your terminal prompt, indicating the virtual environment is active. - On Windows:
-
Go into medical_assistants directory and run
crewai install
-
Add your GEMINI API key to .env files by adding
GEMINI_API_KEY=<your_api_key>
or run on the terminal:export GEMINI_API_KEY=<your_api_key>
. Ensure that .env file inside the medical_assistants directory looks like this:MODEL=gemini/gemini-1.5-flash GEMINI_API_KEY=<api_key> OTEL_SDK_DISABLED=true
-
Return to DiagnoCrew directory
-
Run
export OTEL_SDK_DISABLED=true
on the terminal.
-
Install the required Python packages using
pip
:pip install -r requirements.txt
This will install all the dependencies listed in the
requirements.txt
file, including Streamlit and thecrewai
library.
-
Ensure you are in the
DiagnoCrew
directory and the virtual environment is activated. -
Run the Streamlit app:
streamlit run app.py
-
The app will start, and a local server will be launched. You should see a message like this in your terminal:
You can now view your Streamlit app in your browser. Local URL: http://localhost:8501 Network URL: http://192.168.x.x:8501
-
Open your web browser and navigate to the provided URL (e.g.,
http://localhost:8501
).
- If you encounter issues activating the virtual environment, ensure you are using the correct command for your operating system.
- If the virtual environment is not recognized, recreate it using
python -m venv .venv
.
- If
pip install -r requirements.txt
fails, ensure you have the latest version ofpip
:pip install --upgrade pip
- If you still encounter issues, try installing the dependencies one by one:
pip install streamlit crewai crewai-tools
- Ensure you are in the
DiagnoCrew
directory before runningstreamlit run app.py
. - If the app does not open in your browser, manually navigate to
http://localhost:8501
.
- Patient information management
- Medical image upload and analysis
- Symptom recording and tracking
- Laboratory results analysis
- AI-assisted diagnostic recommendations
- Start new session
- Navigate by double-clicking on buttons or sidebar.
- Enter patient data and medical history.
- Upload relevant medical images
- Enter visible symptoms, onset and duration, as well as other details.
- If any lab tests were conducted, click on lab tests tab and enter the results and measurements.
- Click on Run Diagnostic Analysis and wait for 2-3 seconds for our Diagnosis Crew to discuss and decide on the causes.
- Once completed, navigate to results page to view full preliminary diagnosis and report.
Here’s an overview of the project structure:
.
├── brain_mri_ViT.ipynb # Jupyter Notebook for Brain MRI analysis
├── data/ # Data files
│ └── normal_ultrasound.jpeg # Sample ultrasound image
├── demo.webm # Demo video
├── DiagnoCrew/ # Main project directory
│ ├── app.py # Streamlit app entry point (duplicate, can be removed)
│ ├── components/ # Reusable UI components
│ │ ├── navigation_buttons.py
│ │ ├── patient_info_display.py
│ │ └── sidebar.py
│ ├── config.py # Configuration settings
│ ├── constants.py # Constants used in the app
│ ├── diagnostic_data/ # Diagnostic data and reports
│ │ └── CASE_20250226_110959_a/
│ │ ├── data_package.json
│ │ └── diagnosis.json
│ ├── diagnostic_report.json # Sample diagnostic report
│ ├── docs/ # Documentation and diagrams
│ │ ├── diagram.png
│ │ ├── diagram.wsd
│ │ ├── workflow.png
│ │ └── workflow.wsd
│ ├── medical_assistants/ # AI agents and backend logic
│ │ ├── backend_services.py # Backend services for the app
│ │ ├── knowledge/ # Knowledge base for the AI
│ │ │ ├── file.txt
│ │ │ └── questions_and_answers.json
│ │ ├── pyproject.toml # Python project configuration
│ │ ├── README.md # Documentation for medical_assistants
│ │ ├── src/ # Source code for medical assistants
│ │ │ └── medical_assistants/
│ │ │ ├── config/ # Configuration files for agents and tasks
│ │ │ │ ├── agents.yaml
│ │ │ │ └── tasks.yaml
│ │ │ ├── crew.py # Crew definition and setup
│ │ │ ├── __init__.py # Package initialization
│ │ │ └── main.py # Main logic for running the crew
│ │ ├── tests/ # Unit tests (currently empty)
│ │ ├── trained_agents_data.pkl # Trained agents data
│ │ ├── training_data.pkl # Training data for agents
│ │ └── uv.lock # Dependency lock file
│ ├── pages/ # Streamlit pages
│ │ ├── Diagnostic_Results.py
│ │ ├── Home.py
│ │ ├── Patient_Information.py
│ │ ├── Symptoms_Lab_Results.py
│ │ └── Upload_Images.py
│ ├── README.md
│ ├── requirements.txt # Python dependencies
│ ├── state.py # State management for the app
│ └── utils/ # Utility functions
│ ├── diagnostics.py # Diagnostic utilities
│ └── reporting.py # Reporting utilities
└── README.md # Main README file for the project
This is a prototype for demonstration purposes only. It is not intended for clinical use.