Update my_pages/information_loss.py
Browse files
my_pages/information_loss.py
CHANGED
|
@@ -1,6 +1,7 @@
|
|
| 1 |
import pandas as pd
|
| 2 |
import streamlit as st
|
| 3 |
from utils import go_to
|
|
|
|
| 4 |
|
| 5 |
ALL_FEATURES = [
|
| 6 |
("Liquid Assets", "Liquid Assets", None),
|
|
@@ -77,7 +78,7 @@ def render():
|
|
| 77 |
st.session_state.show_message = (feature[2])
|
| 78 |
st.rerun()
|
| 79 |
|
| 80 |
-
|
| 81 |
if "show_message" in st.session_state:
|
| 82 |
del st.session_state.show_message
|
| 83 |
|
|
@@ -85,10 +86,13 @@ def render():
|
|
| 85 |
# f"<div style='text-align:center; color:#c0392b; font-weight:600; margin:14px 0;'>{st.session_state.show_message}</div>",
|
| 86 |
# unsafe_allow_html=True,
|
| 87 |
# )
|
| 88 |
-
|
| 89 |
-
|
|
|
|
|
|
|
|
|
|
| 90 |
if st.button("OK"):
|
| 91 |
-
|
| 92 |
|
| 93 |
# st.markdown("---")
|
| 94 |
|
|
|
|
| 1 |
import pandas as pd
|
| 2 |
import streamlit as st
|
| 3 |
from utils import go_to
|
| 4 |
+
from streamlit_modal import Modal
|
| 5 |
|
| 6 |
ALL_FEATURES = [
|
| 7 |
("Liquid Assets", "Liquid Assets", None),
|
|
|
|
| 78 |
st.session_state.show_message = (feature[2])
|
| 79 |
st.rerun()
|
| 80 |
|
| 81 |
+
modal = Modal("My Modal")
|
| 82 |
if "show_message" in st.session_state:
|
| 83 |
del st.session_state.show_message
|
| 84 |
|
|
|
|
| 86 |
# f"<div style='text-align:center; color:#c0392b; font-weight:600; margin:14px 0;'>{st.session_state.show_message}</div>",
|
| 87 |
# unsafe_allow_html=True,
|
| 88 |
# )
|
| 89 |
+
modal.open()
|
| 90 |
+
|
| 91 |
+
if modal.is_open():
|
| 92 |
+
with modal.container():
|
| 93 |
+
st.write("Here's the message!")
|
| 94 |
if st.button("OK"):
|
| 95 |
+
modal.close()
|
| 96 |
|
| 97 |
# st.markdown("---")
|
| 98 |
|