Created
August 5, 2021 17:30
-
-
Save stevenkolawole/104d0234f9f02eebf34d7dd725dfbcc4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import numpy as np | |
| import plotly.express as px | |
| import streamlit as st | |
| st.title('Distribution Tester') | |
| st.write('Pick a distribution from the list and we shall draw \ | |
| the line chart from a random sample from the distribution') | |
| keys = ['Normal','Uniform'] | |
| dist_key = st.selectbox('Which distribution do you want to plot?', keys) | |
| if dist_key == 'Normal': | |
| nums = np.random.randn(1000) | |
| elif dist_key == 'Uniform': | |
| nums = np.array([np.random.randint(100) for i in range(1000)]) | |
| # Display user | |
| fig = px.line(nums) | |
| st.plotly_chart(fig) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment