Skip to content

Repository files navigation

PRISM (Pharmaceutical Risk Interaction and Safety Monitor)

image

Table of Contents

Prerequisites

Make sure you have Python and pip installed on your machine.

  1. Install Python

    • Windows: Download the installer from the official Python website and run it. Make sure to check the box that says "Add Python to PATH" during installation.

    • macOS: You can use Homebrew to install Python. Open your terminal and run:

      brew install python
      python -m ensurepip --upgrade
    • Linux: Use your package manager to install Python. For example, on Ubuntu, run:

      sudo apt update
      sudo apt install python3 python3-pip
  2. Verify the installation

    After installation, verify that Python and pip are installed correctly by running the following commands in your terminal or command prompt:

    python --version
    pip --version
  3. Clone the repository

    git clone https://github.com/mosmar99/PRISM.git
    cd PRISM
  4. Create a virtual environment (optional but recommended)

    python -m venv venv
    # Activate the virtual environment
    # On Windows
    venv\Scripts\activate
    # On macOS/Linux
    source venv/bin/activate
  5. Install dependencies

    pip install -r requirements.txt
    # if this doesn't work try restarting your terminal
    chainlit --version

    Connecting to the Gemini API

    Google's gemini model has a free API version info here:

    https://ai.google.dev/pricing#1_5flash

    Get your Google API key here:

    https://aistudio.google.com/app/apikey

    Whilst in the PRISM directory type:

    # Using windows powershell.
    New-Item .env
    # linux / macos
    touch .env

    open up your newly create .env file, and add the following line

    # replace the text within the quotation marks ("") with your actual API key, make sure you keep the quotation marks
    API_KEY = "YOUR_API_KEY_GOTTEN_FROM_GOOGLE"

Usage

After verifying your installations as descibed above, getting your API key & creating your .env file run the application as such:

chainlit run .\src\main.py

This will open up a web application on the local network at port 8000. After the application has started you may select your chat profile at the drop down menu at the top!

If the above command doesn't work you can verify your chainlit installation by:

chainlit run hello

If that works something is probably wrong with your API key / .env file.

Authors

  • Mahmut Osmanovic (mosmar99)
  • Isac Paulsson (isacpaulsson)
  • Sebastian Tuura (tuura01)
  • Clément Pickel (clementpickel)
  • Célian Freidrich (friedrichcelian)

About

PRISM is an AI-powered medical decision support application combining LLMs with a WikiData knowledge graph. The system enables medication interaction analysis, side-effect detection, alternative drug suggestions, and symptom-based recommendations via a Chainlit chat interface.

Resources

Stars

Watchers

Forks

Used by

Contributors

Languages