https://github.com/promptable/streamlit-playground
Streamlit Version of OAI Playground with Batch Inputs
https://github.com/promptable/streamlit-playground
chatbot chatgpt gpt3 openai python streamlit
Last synced: about 1 year ago
JSON representation
Streamlit Version of OAI Playground with Batch Inputs
- Host: GitHub
- URL: https://github.com/promptable/streamlit-playground
- Owner: promptable
- License: mit
- Created: 2022-11-22T17:15:23.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-11-24T00:34:43.000Z (over 3 years ago)
- Last Synced: 2025-03-24T09:03:39.259Z (about 1 year ago)
- Topics: chatbot, chatgpt, gpt3, openai, python, streamlit
- Language: Python
- Homepage: https://promptable.ai
- Size: 564 KB
- Stars: 6
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Streamlit Playground (e.g. OpenAI Playground)
(Attempt) to replicate OpenAI playground in Streamlit, but with additional features like running batches of inputs.
### Playground

### Batch Inputs

## Setup
Requires Python 3.6+. Tested on Mac M1 Python 3.9.
1. Create an account with OpenAI and add your API key to `.env.secrets`
2. Install python requirements.
```bash
# Ensure you're using python 3.6+
python3 --version
# Uses your default python environment
pip3 install -r requirements.txt
# Alternatively, create a virtual environment (recommended)
pip3 install virtualenv
virtualenv .venv --python python3
source .venv/bin/activate
pip3 install -r requirements.txt
```
NOTE: If you're on Mac M1, and get stuck installing gevent / grpcio, try this:
```bash
pip3 install --no-cache-dir --upgrade --force-reinstall -Iv grpcio gevent
pip3 install -r requirements.txt
```
3. Run streamlit
```bash
# Run the streamlit app
streamlit run playground_streamlit.py
# Should open a new tab in your browser at
http://localhost:8501/
# If running on remote box (EC2, etc). Expose the port, then:
streamlit run --server.headless true playground_streamlit.py --server.port 8502
```
## Adding passwords
If you're hosting, do this to get password protection.
```bash
```
## Backlog
- S3 backend for saving prompts, inputs
- Add more models/providers
- Streaming completions
Feel free to add features and submit PRs!