Agent skill
streamlit-8-advanced-features
Sub-skill of streamlit: 8. Advanced Features.
Install this agent skill to your Project
npx add-skill https://github.com/vamseeachanta/workspace-hub/tree/main/.claude/skills/_archive/data/analysis/streamlit/8-advanced-features
SKILL.md
8. Advanced Features
8. Advanced Features
Status and Progress:
import streamlit as st
import time
# Progress bar
progress = st.progress(0, text="Processing...")
for i in range(100):
time.sleep(0.01)
progress.progress(i + 1, text=f"Processing... {i+1}%")
# Spinner
with st.spinner("Loading data..."):
time.sleep(2)
st.success("Done!")
# Status messages
st.success("Operation successful!")
st.info("This is informational")
st.warning("Warning: Check your inputs")
st.error("An error occurred")
st.exception(ValueError("Example exception"))
# Toast notifications
st.toast("Data saved!", icon="✅")
# Balloons and snow
st.balloons()
st.snow()
Chat Interface:
import streamlit as st
import time
st.title("Chat Demo")
# Initialize chat history
if "messages" not in st.session_state:
st.session_state.messages = []
# Display chat history
for message in st.session_state.messages:
with st.chat_message(message["role"]):
st.markdown(message["content"])
# Chat input
if prompt := st.chat_input("What's on your mind?"):
# Add user message
st.session_state.messages.append({"role": "user", "content": prompt})
with st.chat_message("user"):
st.markdown(prompt)
# Generate response
with st.chat_message("assistant"):
response = f"You said: {prompt}"
st.markdown(response)
st.session_state.messages.append({"role": "assistant", "content": response})
Data Editor:
import streamlit as st
import pandas as pd
# Editable dataframe
df = pd.DataFrame({
"Name": ["Alice", "Bob", "Charlie"],
"Age": [25, 30, 35],
"Active": [True, False, True]
})
edited_df = st.data_editor(
df,
num_rows="dynamic", # Allow adding/deleting rows
column_config={
"Name": st.column_config.TextColumn("Name", required=True),
"Age": st.column_config.NumberColumn("Age", min_value=0, max_value=120),
"Active": st.column_config.CheckboxColumn("Active")
}
)
if st.button("Save changes"):
st.write("Saved:", edited_df)
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
gsd-complete-milestone
Archive completed milestone and prepare for next version
gsd-reapply-patches
Reapply local modifications after a GSD update
gsd-verify-work
Validate built features through conversational UAT
gsd-thread
Manage persistent context threads for cross-session work
clinical-trial-protocol
Generate clinical trial protocols for medical devices or drugs through a modular, waypoint-based architecture with research-only and full protocol modes.
single-cell-rna-qc
Performs quality control on single-cell RNA-seq data (.h5ad or .h5 files) using scverse best practices with MAD-based filtering and comprehensive visualizations.
Didn't find tool you were looking for?