If you pop in the following, you see the value “takes” but the input box is empty:
st.sidebar.markdown(str(prior_variance))
I fully admit that I may be doing something wrong with the python formatting string, but if so it’s not clear why the input box would be empty rather than streamlit throwing an error. Any help/insight would be appreciated!
To get the result you’re looking for, use format="%.3f". Our documentation is wrong; it claims to support Python-style format strings, but in fact it just supports printf-style strings. I’ve opened a PR against that here: https://github.com/streamlit/streamlit/pull/799
Another issue is that, yeah - we definitely should be detecting bad format strings on the Python side, and show a warning. I’ve opened a bug about that here: https://github.com/streamlit/streamlit/issues/800