Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,7 +1,10 @@
|
|
| 1 |
import streamlit as st
|
|
|
|
|
|
|
| 2 |
|
| 3 |
st.set_page_config(page_title="8 Dimensions of Self Care", page_icon=":heart:")
|
| 4 |
st.title("8 Dimensions of Self Care")
|
|
|
|
| 5 |
st.markdown("""
|
| 6 |
|
| 7 |
# Positive Reframing Strategies for Self Care
|
|
@@ -55,4 +58,31 @@ st.markdown("""
|
|
| 55 |
4. Limit alcohol and drug consumption
|
| 56 |
|
| 57 |
|
| 58 |
-
""")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
import streamlit as st
|
| 2 |
+
import graphviz as gv
|
| 3 |
+
|
| 4 |
|
| 5 |
st.set_page_config(page_title="8 Dimensions of Self Care", page_icon=":heart:")
|
| 6 |
st.title("8 Dimensions of Self Care")
|
| 7 |
+
|
| 8 |
st.markdown("""
|
| 9 |
|
| 10 |
# Positive Reframing Strategies for Self Care
|
|
|
|
| 58 |
4. Limit alcohol and drug consumption
|
| 59 |
|
| 60 |
|
| 61 |
+
""")
|
| 62 |
+
|
| 63 |
+
|
| 64 |
+
g = gv.Graph(format='svg', engine='circo')
|
| 65 |
+
|
| 66 |
+
g.node('B', label="8 Dimensions of Self Care", shape="ellipse", fontsize="20", style="filled", fillcolor="lightblue")
|
| 67 |
+
|
| 68 |
+
dimensions = [
|
| 69 |
+
('A', "π± Emotional\nHow we feel"),
|
| 70 |
+
('C', "π Spiritual\nOur beliefs"),
|
| 71 |
+
('D', "π° Financial\nHow we manage money"),
|
| 72 |
+
('E', "π‘ Cognitive\nHow we think"),
|
| 73 |
+
('F', "π― Aptitudinal\nOur abilities"),
|
| 74 |
+
('G', "π€ Relational\nOur connections"),
|
| 75 |
+
('H', "π Environmental\nOur surroundings"),
|
| 76 |
+
('I', "πββοΈ Physical\nOur bodies"),
|
| 77 |
+
]
|
| 78 |
+
|
| 79 |
+
for node, label in dimensions:
|
| 80 |
+
g.node(node, label=label, shape="ellipse", fontsize="16", style="filled", fillcolor="lightgoldenrodyellow")
|
| 81 |
+
|
| 82 |
+
for node, _ in dimensions:
|
| 83 |
+
g.edge('B', node)
|
| 84 |
+
|
| 85 |
+
st.graphviz_chart(g)
|
| 86 |
+
|
| 87 |
+
|
| 88 |
+
|