Skip to content

crvernon/highlight

Repository files navigation

build DOI

highlight

Generate publication highlights using AI

Setting Up OpenAI API Key

To use the OpenAI API, you need to set up an API key and set it as an environment variable.

  1. Obtain your OpenAI API key from the OpenAI website.

  2. Set the API key as an environment variable:

    • On Windows:
      set OPENAI_API_KEY=your_api_key_here
    • On macOS and Linux:
      export OPENAI_API_KEY=your_api_key_here

Replace your_api_key_here with your actual OpenAI API key.

Installation

Clone this repository

Navigate to the directory you want to store this repo in and run:

git clone https://github.com/crvernon/highlight.git

To install this Python package in a virtual environment, you can use either pip or Anaconda.

Using pip

  1. Create a virtual environment:

    python -m venv highlight_env
  2. Activate the virtual environment:

    • On Windows:
      highlight_env\Scripts\activate
    • On macOS and Linux:
      source highlight_env/bin/activate
  3. Install the package from the cloned highlight directory:

    pip install .

Using Anaconda

  1. Create a virtual environment:

    conda create --name highlight_env python=3.9
  2. Activate the virtual environment:

    conda activate highlight_env
  3. Install the package from the cloned highlight directory:

    pip install .

Running the App

To run the app using Streamlit, follow these steps:

  1. Ensure your virtual environment is activated.

  2. Run the Streamlit app from the highlight directory:

    streamlit run app.py