An AI-powered clinical decision support tool designed to help medical practitioners quickly identify and analyze potential drug-drug and drug-disease interactions. Leveraging a Retrieval-Augmented Generation (RAG) system, this application queries a knowledge base built from official FDA drug label data to provide evidence-based insights.
- AI-Powered Analysis: Uses a RAG system to provide answers based on FDA data.
- Dual Interaction Modes: Offers both a simple "Prompt Mode" and a guided "AI Mode" for structured queries.
- User Authentication: Secure login and signup for personalized history.
- Persistent History: Saves and loads user query history from local storage.
- PDF Document Upload: Extracts text from uploaded medical documents for analysis.
- Frontend: React.js, Vite
- Backend: Python, Flask
- AI / ML: LangChain, FAISS, Sentence Transformers, Replicate
- Database: FAISS Vector Store, SQLite (optional)
Follow these instructions to set up and run the project on your local machine.
Make sure you have the following installed on your system:
-
Clone the repository:
git clone [https://github.com/YourUsername/Comorbid-App.git](https://github.com/YourUsername/Comorbid-App.git) cd Comorbid-App -
Backend Setup:
# Navigate to the backend directory cd backend # Create and activate a virtual environment python -m venv venv source venv/bin/activate # On macOS/Linux # venv\Scripts\activate # On Windows # Install Python dependencies pip install -r requirements.txt
-
Frontend Setup:
# Navigate to the frontend directory from the root cd frontend # Install Node.js dependencies npm install
The backend requires an .env file to store API keys and other configuration.
-
In the
/backenddirectory, create a file named.env. -
Add the necessary variables. It should look something like this:
# Example .env file REPLICATE_API_TOKEN="your_replicate_api_token_here"
You need to run the backend and frontend servers in two separate terminals.
-
Build the Vector Database (One-time setup): Before the first run, you must create the FAISS index from your source data.
# From the /backend directory, with venv active python create_database.py -
Start the Backend Server:
# From the /backend directory, with venv active python app.pyThe backend will now be running on
http://127.0.0.1:5000. -
Start the Frontend Server:
# From the /frontend directory npm run devOpen your browser and navigate to the URL provided (usually
http://localhost:5173).
This project is licensed under the MIT License - see the LICENSE file for details.
Devang - GitHub Profile