Calmcode - streamlit: line charts

Making line charts with streamlit.

1 2 3 4 5 6 7 8 9

This is the that we end up with at the end of the video;

import streamlit as st
import numpy as np

st.write("Here is our super important simulation")

x = st.slider('Slope', min_value=0.01, max_value=0.10, step=0.01)
y = st.slider('Noise', min_value=0.01, max_value=0.10, step=0.01)

st.write(f"x={x} y={y}")
values = np.cumprod(1 + np.random.normal(x, y, (100, 10)), axis=0)

Note that we run this app from the command line by running;

streamlit run