Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -102,28 +102,8 @@ st.write(':sunglasses: :smile: :angry: :disappointed: :fearful: :rage: :weary:
|
|
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:
|
@@ -133,6 +113,20 @@ else:
|
|
133 |
|
134 |
button = st.button("Analyze")
|
135 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
136 |
|
137 |
if button and user_input:
|
138 |
alpaca_prompt = """Below is a conversation between a human and an AI agent. write a response based on the input.
|
|
|
102 |
|
103 |
# st.write("You selected:", option)
|
104 |
|
|
|
|
|
|
|
105 |
|
106 |
option = ""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
107 |
user_input = ""
|
108 |
|
109 |
if option:
|
|
|
113 |
|
114 |
button = st.button("Analyze")
|
115 |
|
116 |
+
st.write("Select sample texts analyse emotion π")
|
117 |
+
village = st.checkbox("Small village")
|
118 |
+
life = st.checkbox("Entire life")
|
119 |
+
|
120 |
+
|
121 |
+
if village:
|
122 |
+
option = "Once, in a small village nestled in the rolling hills of Tuscany, lived an elderly woman named Isabella."
|
123 |
+
elif life:
|
124 |
+
option = "She had spent her entire life in this village, raising her children and caring for her garden, which was the most"
|
125 |
+
elif another:
|
126 |
+
option = "beautiful in the region. Her husband, Marco, had passed away many years ago, leaving her with a heart full of memories "
|
127 |
+
else:
|
128 |
+
option =""
|
129 |
+
|
130 |
|
131 |
if button and user_input:
|
132 |
alpaca_prompt = """Below is a conversation between a human and an AI agent. write a response based on the input.
|