Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -39,9 +39,17 @@ def home_page():
|
|
39 |
st.write("# Mental Health Well Being App! \U0001f64f")
|
40 |
st.markdown(
|
41 |
"""
|
42 |
-
|
43 |
-
|
44 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
"""
|
46 |
)
|
47 |
def PSS_monthly():
|
@@ -181,7 +189,7 @@ def daily_log():
|
|
181 |
score = out[0]['score']
|
182 |
st.write(f'Yay!! You are having a great day and we know that you are worth of it \U0001f60d')
|
183 |
elif out[0]['label'] =='Negative':
|
184 |
-
st.write("Sorry you had a bad day but you
|
185 |
habit = st.selectbox('Did you stick with the habit?',('Yes', 'No'))
|
186 |
history = ["\U0001F612","\U0001F600","\U0001F600","\U0001F612","\U0001F600","\U0001F612"]
|
187 |
days = ['Day1', 'Day2', 'Day3', 'Day4', 'Day5', 'Day6']
|
@@ -321,7 +329,8 @@ def daily_log():
|
|
321 |
res = classifier(sent, candidate_labels)
|
322 |
problem = res['labels'][0]
|
323 |
st.write('We feel working on ',problem ,' could improve your overall well-being')
|
324 |
-
st.markdown("""
|
|
|
325 |
if problem == 'Sleep-disorder':
|
326 |
st.write("Try this [Mediatation for Sleep on Headspace](https://www.headspace.com/meditation/sleep)")
|
327 |
st.write("Try this [Yammer community for Mindfulness](https://web.yammer.com/main/org/optum.com/groups/eyJfdHlwZSI6Ikdyb3VwIiwiaWQiOiI1NzMxOTMxNzUwNCJ9/new)")
|
@@ -336,9 +345,9 @@ def daily_log():
|
|
336 |
#st.write(type(res['labels']))
|
337 |
|
338 |
else:
|
339 |
-
warning = '<p style="font-family:sans-serif; color:Red; font-size:
|
340 |
st.markdown(warning, unsafe_allow_html=True)
|
341 |
-
st.write('Looks like you have not tracked your habits for a week. Instant solutions may not always work. Keep track for atleast 7 days')
|
342 |
|
343 |
page_names_to_funcs = {
|
344 |
"Home": home_page,
|
|
|
39 |
st.write("# Mental Health Well Being App! \U0001f64f")
|
40 |
st.markdown(
|
41 |
"""
|
42 |
+
A platform where we celebrate mental well-being and make our users proactive and motivated to take charge of their own mental health
|
43 |
+
|
44 |
+
How?
|
45 |
+
|
46 |
+
1. Bring awareness to a user of relevant available self help solutions based on series of daily journal entries for a week
|
47 |
+
|
48 |
+
2. Provide the user with their Perceived Stress Scale Score [PSS](https://www.das.nh.gov/wellness/docs/percieved%20stress%20scale.pdf) and informative trends to help them navigate the seriousness of any underlying mental challenges
|
49 |
+
|
50 |
+
3. Feature happy memories using AI, encourage gratefulness and eventually reinforce behavioral change
|
51 |
+
|
52 |
+
**👈 Click the dropdown to explore more**
|
53 |
"""
|
54 |
)
|
55 |
def PSS_monthly():
|
|
|
189 |
score = out[0]['score']
|
190 |
st.write(f'Yay!! You are having a great day and we know that you are worth of it \U0001f60d')
|
191 |
elif out[0]['label'] =='Negative':
|
192 |
+
st.write("Sorry you had a bad day but you always have an another day to improve \U0001f91d \U0001f917")
|
193 |
habit = st.selectbox('Did you stick with the habit?',('Yes', 'No'))
|
194 |
history = ["\U0001F612","\U0001F600","\U0001F600","\U0001F612","\U0001F600","\U0001F612"]
|
195 |
days = ['Day1', 'Day2', 'Day3', 'Day4', 'Day5', 'Day6']
|
|
|
329 |
res = classifier(sent, candidate_labels)
|
330 |
problem = res['labels'][0]
|
331 |
st.write('We feel working on ',problem ,' could improve your overall well-being')
|
332 |
+
st.markdown("""#### Not sure where to start? """+ """ \U0001f914 """+""" Here are our recommendations!! \U0001f917""")
|
333 |
+
#st.markdown("""###Not sure where to start?###"""+ """ \U0001f914 """+""" ###Here are our recommendations!!### \U0001f917""")
|
334 |
if problem == 'Sleep-disorder':
|
335 |
st.write("Try this [Mediatation for Sleep on Headspace](https://www.headspace.com/meditation/sleep)")
|
336 |
st.write("Try this [Yammer community for Mindfulness](https://web.yammer.com/main/org/optum.com/groups/eyJfdHlwZSI6Ikdyb3VwIiwiaWQiOiI1NzMxOTMxNzUwNCJ9/new)")
|
|
|
345 |
#st.write(type(res['labels']))
|
346 |
|
347 |
else:
|
348 |
+
warning = '<p style="font-family:sans-serif; color:Red; font-size: 12px;">Looks like you have not tracked your habits for a week. Instant solutions may not always work. Keep track for atleast 7 days</p>'
|
349 |
st.markdown(warning, unsafe_allow_html=True)
|
350 |
+
#st.write('Looks like you have not tracked your habits for a week. Instant solutions may not always work. Keep track for atleast 7 days')
|
351 |
|
352 |
page_names_to_funcs = {
|
353 |
"Home": home_page,
|