Minor updates
- format function - add hvplot
This commit is contained in:
parent
a39b3c9492
commit
9fade9229b
2 changed files with 10 additions and 3 deletions
|
@ -2,3 +2,6 @@ numpy
|
||||||
matplotlib
|
matplotlib
|
||||||
streamlit
|
streamlit
|
||||||
scipy
|
scipy
|
||||||
|
hvplot
|
||||||
|
bokeh
|
||||||
|
holoviews
|
||||||
|
|
10
st_runner.py
10
st_runner.py
|
@ -21,9 +21,13 @@ for basename in os.listdir(folder):
|
||||||
fnames.append(fname)
|
fnames.append(fname)
|
||||||
|
|
||||||
# Make a UI to run different files.
|
# Make a UI to run different files.
|
||||||
files = {f.split("/")[-1].split(".")[0]: f for f in fnames}
|
def format_func(s):
|
||||||
filename = st.sidebar.selectbox("Select an app", list(files.keys()))
|
return s.split("/")[-1].split(".")[0]
|
||||||
fname_to_run = files[filename]
|
|
||||||
|
|
||||||
|
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
|
# Create module from filepath and put in sys.modules, so Streamlit knows
|
||||||
# to watch it for changes.
|
# to watch it for changes.
|
||||||
|
|
Loading…
Reference in a new issue