From 4f09d81df1b28f1e4911dc5a9c059e053c8e6e09 Mon Sep 17 00:00:00 2001 From: Carey Phelps Date: Thu, 8 Feb 2024 07:43:30 -0800 Subject: [PATCH] reorganize streamlit folder --- examples/streamlit/README.md | 43 ++---------------- examples/streamlit/quickstart/README.md | 40 ++++++++++++++++ .../{ => quickstart}/requirements.txt | 0 .../static/gifs/embed_wandb_project_dash.gif | Bin .../static/gifs/embed_wandb_run_dash.gif | Bin .../static/gifs/use_wandb_logging.gif | Bin .../{ => quickstart}/wandb_streamlit_app.py | 0 .../streamlit/{ => quickstart}/wandb_utils.py | 0 8 files changed, 45 insertions(+), 38 deletions(-) create mode 100644 examples/streamlit/quickstart/README.md rename examples/streamlit/{ => quickstart}/requirements.txt (100%) rename examples/streamlit/{ => quickstart}/static/gifs/embed_wandb_project_dash.gif (100%) rename examples/streamlit/{ => quickstart}/static/gifs/embed_wandb_run_dash.gif (100%) rename examples/streamlit/{ => quickstart}/static/gifs/use_wandb_logging.gif (100%) rename examples/streamlit/{ => quickstart}/wandb_streamlit_app.py (100%) rename examples/streamlit/{ => quickstart}/wandb_utils.py (100%) diff --git a/examples/streamlit/README.md b/examples/streamlit/README.md index a4cb8f9f..02480616 100644 --- a/examples/streamlit/README.md +++ b/examples/streamlit/README.md @@ -1,40 +1,7 @@ -# Using W&B and Streamlit +# Streamlit -## Description +Use Streamlit with W&B for quick, interactive apps. +We have two example use cases here in this repo: -Example repo to show off the different possibilties when utilizing both W&B and Streamlit. In this repo we hit two scenarios in terms of interaction with W&B and Streamlit. - -1. Embed an IFrame of the WANDB dashboard within the Streamlit application. This is shown in the application when selecting the `Embed IFrame` option. In this variant we allow users to select a project and run. We then display both the project dashboard and run dashboard from WANDB - -2. Use WANDB traiditionally to log artifacts that can be pulled from an experiment to visualize traditionally. This is shown in the application when selecting the `Use WANDB Logging` option. In this variant we provide a minimal example of an WANDB experiment that can be run to the users account upon click. When said experiment is finished, it should load in a logged HTML page saved in WANDB to the file directory of the Streamlit project to then be displayed by Stteamlit. - -## Install - -``` -pip install -r requirements.txt -``` - -Generate a `.env` file in the root of the project with variables: - -``` -WANDB_API_KEY= -WANDB_ENTITY= -``` - -## Usage - -To run streamlit on localhost use command: `streamlit run wandb_streamlit_app.py` - -## Examples - -### WANDB Project Dashboard - - - -### WANDB Run Dashboard - - - -### WANDB HTML Artifact rendered via Streamlit - - +1. **Quickstart**: Embed an iframe of W&B in a Streamlit app +2. **Annotation**: Interactively annotate LLM data \ No newline at end of file diff --git a/examples/streamlit/quickstart/README.md b/examples/streamlit/quickstart/README.md new file mode 100644 index 00000000..a4cb8f9f --- /dev/null +++ b/examples/streamlit/quickstart/README.md @@ -0,0 +1,40 @@ +# Using W&B and Streamlit + +## Description + +Example repo to show off the different possibilties when utilizing both W&B and Streamlit. In this repo we hit two scenarios in terms of interaction with W&B and Streamlit. + +1. Embed an IFrame of the WANDB dashboard within the Streamlit application. This is shown in the application when selecting the `Embed IFrame` option. In this variant we allow users to select a project and run. We then display both the project dashboard and run dashboard from WANDB + +2. Use WANDB traiditionally to log artifacts that can be pulled from an experiment to visualize traditionally. This is shown in the application when selecting the `Use WANDB Logging` option. In this variant we provide a minimal example of an WANDB experiment that can be run to the users account upon click. When said experiment is finished, it should load in a logged HTML page saved in WANDB to the file directory of the Streamlit project to then be displayed by Stteamlit. + +## Install + +``` +pip install -r requirements.txt +``` + +Generate a `.env` file in the root of the project with variables: + +``` +WANDB_API_KEY= +WANDB_ENTITY= +``` + +## Usage + +To run streamlit on localhost use command: `streamlit run wandb_streamlit_app.py` + +## Examples + +### WANDB Project Dashboard + + + +### WANDB Run Dashboard + + + +### WANDB HTML Artifact rendered via Streamlit + + diff --git a/examples/streamlit/requirements.txt b/examples/streamlit/quickstart/requirements.txt similarity index 100% rename from examples/streamlit/requirements.txt rename to examples/streamlit/quickstart/requirements.txt diff --git a/examples/streamlit/static/gifs/embed_wandb_project_dash.gif b/examples/streamlit/quickstart/static/gifs/embed_wandb_project_dash.gif similarity index 100% rename from examples/streamlit/static/gifs/embed_wandb_project_dash.gif rename to examples/streamlit/quickstart/static/gifs/embed_wandb_project_dash.gif diff --git a/examples/streamlit/static/gifs/embed_wandb_run_dash.gif b/examples/streamlit/quickstart/static/gifs/embed_wandb_run_dash.gif similarity index 100% rename from examples/streamlit/static/gifs/embed_wandb_run_dash.gif rename to examples/streamlit/quickstart/static/gifs/embed_wandb_run_dash.gif diff --git a/examples/streamlit/static/gifs/use_wandb_logging.gif b/examples/streamlit/quickstart/static/gifs/use_wandb_logging.gif similarity index 100% rename from examples/streamlit/static/gifs/use_wandb_logging.gif rename to examples/streamlit/quickstart/static/gifs/use_wandb_logging.gif diff --git a/examples/streamlit/wandb_streamlit_app.py b/examples/streamlit/quickstart/wandb_streamlit_app.py similarity index 100% rename from examples/streamlit/wandb_streamlit_app.py rename to examples/streamlit/quickstart/wandb_streamlit_app.py diff --git a/examples/streamlit/wandb_utils.py b/examples/streamlit/quickstart/wandb_utils.py similarity index 100% rename from examples/streamlit/wandb_utils.py rename to examples/streamlit/quickstart/wandb_utils.py