Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/streamlit/llm-examples
Streamlit LLM app examples for getting started
https://github.com/streamlit/llm-examples
Last synced: 6 days ago
JSON representation
Streamlit LLM app examples for getting started
- Host: GitHub
- URL: https://github.com/streamlit/llm-examples
- Owner: streamlit
- License: apache-2.0
- Created: 2023-05-24T21:05:08.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-06-27T07:39:22.000Z (6 months ago)
- Last Synced: 2024-12-26T06:05:27.503Z (13 days ago)
- Language: Python
- Homepage: https://streamlit.io/generative-ai
- Size: 1.53 MB
- Stars: 666
- Watchers: 7
- Forks: 1,450
- Open Issues: 23
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-generative-ai-data-scientist - Streamlit LLM Examples
- awesome-generative-ai-data-scientist - Streamlit LLM Examples
README
# 🎈 Streamlit + LLM Examples App
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/streamlit/llm-examples?quickstart=1)
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](https://static.streamlit.io/badges/streamlit_badge_black_white.svg)](https://llm-examples.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:```sh
OPENAI_API_KEY='xxxxxxxxxx'
```## Run it locally
```sh
virtualenv .venv
source .venv/bin/activate
pip install -r requirements.txt
streamlit run Chatbot.py
```