Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -102,16 +102,30 @@ st.write(':sunglasses: :smile: :angry: :disappointed: :fearful: :rage: :weary:
|
|
102 |
|
103 |
# st.write("You selected:", option)
|
104 |
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
|
109 |
-
|
110 |
-
|
111 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
112 |
option = "Once, in a small village nestled in the rolling hills of Tuscany, lived an elderly woman named Isabella."
|
113 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
114 |
user_input = ""
|
|
|
115 |
if option:
|
116 |
user_input = st.text_area('Enter Text to Analyze', value=option)
|
117 |
else:
|
|
|
102 |
|
103 |
# st.write("You selected:", option)
|
104 |
|
105 |
+
if "visibility" not in st.session_state:
|
106 |
+
st.session_state.visibility = "visible"
|
107 |
+
st.session_state.disabled = False
|
108 |
|
109 |
+
option = ""
|
110 |
+
# village = st.checkbox("Small village")
|
111 |
+
# life = st.checkbox("Entire life")
|
112 |
+
st.radio(
|
113 |
+
"Select sample texts analyse emotion 👉",
|
114 |
+
key="visibility",
|
115 |
+
options=["village", "life", "another"],
|
116 |
+
)
|
117 |
+
|
118 |
+
if st.session_state.visibility == "village":
|
119 |
option = "Once, in a small village nestled in the rolling hills of Tuscany, lived an elderly woman named Isabella."
|
120 |
+
elif st.session_state.visibility == "life":
|
121 |
+
option = "She had spent her entire life in this village, raising her children and caring for her garden, which was the most"
|
122 |
+
elif st.session_state.visibility == "another":
|
123 |
+
option = "beautiful in the region. Her husband, Marco, had passed away many years ago, leaving her with a heart full of memories "
|
124 |
+
else:
|
125 |
+
option =""
|
126 |
+
|
127 |
user_input = ""
|
128 |
+
|
129 |
if option:
|
130 |
user_input = st.text_area('Enter Text to Analyze', value=option)
|
131 |
else:
|