Spaces:
Runtime error
Runtime error
anagri
commited on
Commit
·
3983765
1
Parent(s):
fc906b0
[Amir] added more examples
Browse files
app.py
CHANGED
@@ -6,7 +6,10 @@ import os
|
|
6 |
# 'growth', 'remove_negations', 'self_affirmation'
|
7 |
EXAMPLES = {
|
8 |
"I lost my Job": ("I lost my Job.", 'growth'),
|
9 |
-
"I
|
|
|
|
|
|
|
10 |
}
|
11 |
categories = ['growth', 'remove_negations', 'self_affirmation', 'detect_rhetoric']
|
12 |
|
@@ -69,4 +72,20 @@ category = st.radio(
|
|
69 |
|
70 |
if st.button('Reframe'):
|
71 |
output = generate_hashtags(input)
|
72 |
-
st.write(output)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
# 'growth', 'remove_negations', 'self_affirmation'
|
7 |
EXAMPLES = {
|
8 |
"I lost my Job": ("I lost my Job.", 'growth'),
|
9 |
+
"I hate when you show off your expensive motorbike": ("I hate when you show off your expensive motorbike.", 'remove_negations'),
|
10 |
+
"I have a lot of work": ("I have a lot of work.", 'self_affirmation'),
|
11 |
+
"Are you saying you are better than me": ("Are you saying you are better than me?", 'detect_rhetoric'),
|
12 |
+
"I am worried about upcomig exams": ("I am worried about upcomig exams.", 'self_affirmation'),
|
13 |
}
|
14 |
categories = ['growth', 'remove_negations', 'self_affirmation', 'detect_rhetoric']
|
15 |
|
|
|
72 |
|
73 |
if st.button('Reframe'):
|
74 |
output = generate_hashtags(input)
|
75 |
+
st.write(output)
|
76 |
+
|
77 |
+
'''
|
78 |
+
---
|
79 |
+
Growth Mindset: Viewing a challenging event as an opportunity to grow and improve
|
80 |
+
|
81 |
+
Impermanence: Viewing situations, good or bad, as impermanent, don’t last forever
|
82 |
+
|
83 |
+
Neutralizing: Replacing a negative emotions with a neutral one
|
84 |
+
|
85 |
+
Optimism: Focussing on positivve things in the present moment, rather than uncertainity of the future
|
86 |
+
|
87 |
+
Self-affirmation: Focussing on strengths and values, and confidence to face challenges
|
88 |
+
|
89 |
+
Thankfulness: Expressing thankfulness or gratitude for the blessings
|
90 |
+
'''
|
91 |
+
|