Minor updates

- format function
- add hvplot
This commit is contained in:
Eric Ma 2020-01-18 10:29:04 -05:00
parent a39b3c9492
commit 9fade9229b
2 changed files with 10 additions and 3 deletions

View File

@ -2,3 +2,6 @@ numpy
matplotlib
streamlit
scipy
hvplot
bokeh
holoviews

View File

@ -21,9 +21,13 @@ for basename in os.listdir(folder):
fnames.append(fname)
# Make a UI to run different files.
files = {f.split("/")[-1].split(".")[0]: f for f in fnames}
filename = st.sidebar.selectbox("Select an app", list(files.keys()))
fname_to_run = files[filename]
def format_func(s):
return s.split("/")[-1].split(".")[0]
fname_to_run = st.sidebar.selectbox(
"Select an app", fnames, format_func=format_func
)
# Create module from filepath and put in sys.modules, so Streamlit knows
# to watch it for changes.