To use the OpenAI API, you need to set up an API key and set it as an environment variable.
-
Obtain your OpenAI API key from the OpenAI website.
-
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
- On Windows:
Replace your_api_key_here
with your actual OpenAI API key.
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.
-
Create a virtual environment:
python -m venv highlight_env
-
Activate the virtual environment:
- On Windows:
highlight_env\Scripts\activate
- On macOS and Linux:
source highlight_env/bin/activate
- On Windows:
-
Install the package from the cloned
highlight
directory:pip install .
-
Create a virtual environment:
conda create --name highlight_env python=3.9
-
Activate the virtual environment:
conda activate highlight_env
-
Install the package from the cloned
highlight
directory:pip install .
To run the app using Streamlit, follow these steps:
-
Ensure your virtual environment is activated.
-
Run the Streamlit app from the
highlight
directory:streamlit run app.py