Skip to content

Latest commit

 

History

History
53 lines (39 loc) · 1.06 KB

File metadata and controls

53 lines (39 loc) · 1.06 KB

MedicalRag2

Setup

Run the following command

  1. Install the requirement
./setup.sh
  1. Unzip all the pdf file (optional)
    Note: the zip file must be in the ingestion/pdf directory
./unzip.sh
  1. Setup environment key for OpenAI in parent folder .env (optional)
OPENAI_API_KEY=xxx
EMBEDDING_MODEL_NAME="openai/text-embedding-3-small"
# EMBEDDING_MODEL_NAME="huggingface/ls-da3m0ns/bge_large_medical"
# EMBEDDING_MODEL_NAME="ollama/snowflake-arctic-embed"
RERANKING_MODEL_NAME="ncbi/MedCPT-Cross-Encoder"
  1. Run this command to ingest the pdf to the chromaDB
python3 ingestion/apply_ingestion.py
  1. You should download ollama and pull the required LLM
    This is a few that you can test out:

     ollama pull phi3:latest
     ollama pull llama3:8b
     ollama pull llama3:instruct
     ollama pull gemma:2b
     ollama pull gemma:2b-instruct
     ollama pull gemma:7b-instruct
     ollama pull gemma:latest
  2. Run this command to start the application

streamlit run app.py