Skip to content

Repository files navigation

Cancer Support App - NCCN Guidelines Processing

This project processes NCCN (National Comprehensive Cancer Network) guidelines and creates a searchable vector index using FAISS.

Setup

  1. Install dependencies:
pip install -r requirements.txt
  1. Create a .env file with your OpenAI API key:
OPENAI_API_KEY=your_api_key_here

Directory Structure

project/
├── nccn_guidelines/      # Place your NCCN PDF files here
├── nccn_index/          # Output directory for FAISS index and metadata
├── requirements.txt     # Project dependencies
├── process_nccn_guidelines.py  # Main processing script
└── README.md           # This file

Usage

  1. Place your NCCN guideline PDF files in the nccn_guidelines directory
  2. Run the processing script:
python process_nccn_guidelines.py

The script will:

  1. Process each PDF file
  2. Split text into chunks
  3. Generate embeddings using OpenAI
  4. Create a FAISS index
  5. Save metadata for each chunk

Output

The script will generate:

  • nccn_index.faiss: The FAISS vector index
  • metadata.json: Metadata about each text chunk including source file and position

About

AI powered cancer patient planning assistance

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages