Skip to content

Latest commit

 

History

History
53 lines (31 loc) · 767 Bytes

File metadata and controls

53 lines (31 loc) · 767 Bytes

streamlit-openai

Setup Development Environment

Enter into the project directory

$ cd stremlit-openai

Create a Python virtual environment,

$ poetry env use python3.12

Activate the Python virtual environment,

$ poetry shell

Install Python packages

$ poetry install

Setup OpenAI API Key

Open the secrets file of Streamlit on your machine, e.g. ~/.streamlit/secrets.toml, and put the OpenAI API key there.

openai_api_key = sk-xxxxxx

Run Streamlit OpanAI app

Run the example app with Streamlit

$ streamlit run src/streamlit_openai/main.py

Then visit `http://127.0.0.1:8501.

Example app screenshot

streamlit-openai