teaching_llm_agents

Rapid prototyping

Co-creating an MVP with GenAI

⚠️ NOTE

Give the AI a role act as a product manager

⬆️📎 Tools

Lecture

Optional

Streamlit

streamlit run script.py
import streamlit as st
import pandas as pd
import numpy as np

st.write("Streamlit supports a wide range of data visualizations")

all_users = ["Alice", "Bob", "Charly"]
with st.container(border=True):
    users = st.multiselect("Users", all_users, default=all_users)
    rolling_average = st.toggle("Rolling average")

np.random.seed(19)
data = pd.DataFrame(np.random.randn(20, len(users)), columns=users)

if rolling_average:
    data = data.rolling(7).mean().dropna()

tab1, tab2 = st.tabs(["Chart", "Dataframe"])
tab1.line_chart(data, height=250)
tab2.dataframe(data, height=250, use_container_width=True)

  1. Open the Secrets Panel: In the left sidebar of your Colab notebook, click on the “🔑 Secrets” icon (it looks like a key).
  2. Add a new secret: Click the ”+ Add new secret” button.
  3. Name the secret: For your ngrok authtoken, you could name it YOUR_AUTHTOKEN (or any other descriptive name you prefer, but remember it for later).
  4. Enter the secret value: Paste your ngrok authtoken into the “Value” field.
  5. Save: Click “Save secret”.

Once saved, you can access this secret in your Python code using from google.colab import userdata and then userdata.get('YOUR_AUTHTOKEN') (replacing 'YOUR_AUTHTOKEN' with the name you gave your secret).