Back to bricks list
Introduction Getting Started
Architecture
Technical Documentation
Tasks
Barplot Plotly Boxplot Plotly Conda env agent Converter Create a sugar type of food Create folder from files Create json dict Create lab note Create note resource Create robot Decompress file Describe Download an scenario Download resource from a S3 bucket Download resource from external source Eat task Env agent Extract column tags to new row Extract column values to row tags Extract row tags to new column Extract row values to column tags Fly task Folder exporter Fs node extractor Generate lab note from note resource GenerateStreamlitTestApp Histogram Plotly Input Input from task output JSON Dict exporter JSON Dict importer Line Plotly Mamba env agent Melt Merge note resources Move robot Output Pip env agent Python agent R conda env agent R mamba env agent Resource exporter Resource importer Resource picker Resource set exporter Resource stacker Robot add Scatterplot Plotly Select a scenario Select note Select note template Send a scenario to a lab Send the resource to a lab Shell wait Smart interactive plot generator Smart json transformer Smart multi tables transformer Smart plot generator Smart table transformer Streamlit agent Streamlit conda agent Streamlit env agent Streamlit mamba agent Streamlit pip env agent Switch2 Table column aggregator Table column aggregator filter Table column annotator Table column concat Table column data numeric filter Table column data text filter Table column operation mass Table column operations Table column scaler Table column tag aggregator Table column tag unfolder Table column tags deleter Table column tags selector Table columns deleter Table columns selector Table exporter Table importer Table replace Table row aggregator Table row aggregator filter Table row annotator Table row concat Table row data numeric filter Table row data text filter Table row scaler Table row tag aggregator Table row tag unfolder Table row tags deleter Table row tags selector Table rows deleter Table rows selector Table scaler Table transposer Task Task Plotly Text exporter Text importer The travel of `Astro` Transformer Unzip and load resource Update note resource Upload resource to S3 Viewer Violinplot Plotly Wait Wait task Write to file Zip resource [Support] Update process typing name [Support] Update resource typing name
Version

Streamlit pip env agent

TASK
3 times
66.67 %
37 seconds
Typing name :  TASK.gws_core.StreamlitPipenvAgent Brick :  gws_core

Agent to generate a streamlit app dashboard in a pip environment

Agent to generate a streamlit app dashboard.

Warning: It is recommended to use code snippets comming from trusted sources.

Here is the general documentation for agent (including how to use the parameters): https://constellab.community/bricks/gws_core/latest/doc/developer-guide/agent/getting-started/69820653-52e0-41ba-a5f3-4d9d54561779

Here is the documentation of the agent: https://constellab.community/bricks/gws_core/latest/doc/developer-guide/agent/env-agent/c6acb3c3-2a7c-44cd-8fb2-ea1beccdbdcc

More information about streamlit: https://streamlit.io

If a resource list or set is provided, the resources will be flatten and added to the streamlit app. The order of the resources of a resource set will not be kept.

Input

Resource
Optional

Output

Streamlit app
Streamlit dashboard app

Configuration

params

Optional

HEHEL ES MECS

Type : dynamicDefault value : [object Object]

env

Optional

YAML configuration of the conda environment (contains the 'streamlit' package)

Type : yaml_code_paramDefault value : [[source]] url = 'https://pypi.python.org/simple' verify_ssl = true name = 'pypi' [requires] python_version = '3.10' [packages] streamlit = '==1.41.1' pandas = '==2.2.2' plotly = '==5.22.0'

code

Optional

Code of the streamlit app to run

Type : python_code_paramDefault value : # This is a template for a streamlit agent. # This generates an app with one dataframe as input. Then the user can select 2 columns to plot a scatter plot. import plotly.express as px import streamlit as st from pandas import DataFrame, read_csv # Your Streamlit app code here st.title("Dashboard example") # show a table from file_path which is a csv file full width if source_paths: df: DataFrame = read_csv(source_paths[0], header=0, index_col=0, sep=',') # show the dataframe st.dataframe(df) # add a select widget with the columns names with no default value # set the selectbox side by side col1, col2 = st.columns(2) with col1: x_col = st.selectbox("Select x column", options=df.columns, index=0) with col2: y_col = st.selectbox("Select y column", options=df.columns, index=1) if x_col and y_col: # Generate a scatter plot with plotly express fig = px.scatter(df, x=x_col, y=y_col) st.plotly_chart(fig)