A demo application showcasing the capabilities of Large Language Models (LLMs) in the medical field. The system supports doctors by automatically extracting data from a patient visit and generating an easy-to-understand summary for the patient.
To run the project, you need:
- Installed Python 3.9+
- API Keys:
- Google Gemini API Key (for Gemini models)
- Groq API Key (for Llama models)
Navigate to the project folder in the terminal:
cd doc2patientFor Windows:
python -m venv venv
venv\Scripts\activateFor macOS / Linux:
python3 -m venv venv
source venv/bin/activateRun the following command in the main project directory (or ensure you install all of them):
pip install streamlit pandas plotly python-dotenv google-genai groq openai pypdf python-docx(Alternatively, if you have a requirements.txt file, run pip install -r requirements.txt)
Create a .env file in the main application folder (or inside the app/ folder) where the app.py file is located.
Add your API keys to it according to the following scheme:
GOOGLE_API_KEY=your_google_gemini_api_key
GROQ_API_KEY=your_groq_api_keyMake sure you are inside the app folder where the app.py file is located. Run the following command:
cd app
streamlit run app.pyA local address (e.g., http://localhost:8501) will appear in the terminal, which will automatically open in your browser.
-
app/app.py- Main entry file for the Streamlit view -
app/pages/- Individual application views:doctor_panel.py- Doctor's panel facilitating the loading and processing of medical notespatient_panel.py- Patient's panel showing an accessible summary of the visitlaboratorium.py- Analytical module facilitating the comparison of models on a built-in dataset
-
app/utils/- Helper files:ai_engine.py- Logic for communication with Llama and Gemini modelstranslations.py- File with multilingual constants to support PL/EN versions
Doctor Panel Facilitates the loading and processing of medical notes. 
Patient Portal Generates an easy-to-understand summary of the visit for the patient. 
Laboratory Module (Model Comparison) Analytical module for comparing different LLMs. 

