Skip to content

streamlit/llm-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

1afdc02 ยท Jun 24, 2024
Jul 19, 2023
Jan 25, 2024
Jan 25, 2024
Oct 9, 2023
Jan 25, 2024
Jan 25, 2024
May 7, 2024
Jul 12, 2023
Aug 15, 2023
Nov 13, 2023
Oct 9, 2023
Jun 24, 2024

Repository files navigation

๐ŸŽˆ Streamlit + LLM Examples App

Open in GitHub Codespaces

Starter examples for building LLM apps with Streamlit.

Overview of the App

This app showcases a growing collection of LLM minimum working examples.

Current examples include:

  • Chatbot
  • File Q&A
  • Chat with Internet search
  • LangChain Quickstart
  • LangChain PromptTemplate
  • Chat with user feedback

Demo App

Streamlit App

Get an OpenAI API key

You can get your own OpenAI API key by following the following instructions:

  1. Go to https://platform.openai.com/account/api-keys.
  2. Click on the + Create new secret key button.
  3. Next, enter an identifier name (optional) and click on the Create secret key button.

Enter the OpenAI API key in Streamlit Community Cloud

To set the OpenAI API key as an environment variable in Streamlit apps, do the following:

  1. At the lower right corner, click on < Manage app then click on the vertical "..." followed by clicking on Settings.
  2. This brings the App settings, next click on the Secrets tab and paste the API key into the text box as follows:
OPENAI_API_KEY='xxxxxxxxxx'

Run it locally

virtualenv .venv
source .venv/bin/activate
pip install -r requirements.txt
streamlit run Chatbot.py