Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -79,19 +79,22 @@ d_emotion = {0: 'admiration', 1: 'amusement', 2: 'anger', 3: 'annoyance', 4: 'ap
|
|
| 79 |
20: 'optimism', 21: 'pride', 22: 'realization', 23: 'relief', 24: 'remorse', 25: 'sadness', 26: 'surprise',
|
| 80 |
27: 'neutral'}
|
| 81 |
|
|
|
|
|
|
|
| 82 |
st.write("Write or paste any number of document texts to analyse the emotion percentage with your document")
|
| 83 |
|
| 84 |
-
# Define the sample text
|
| 85 |
-
sample_text = ("Once, in a small village nestled in the rolling hills of Tuscany, lived an elderly woman named Isabella. "
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
# Add button to fill in sample text
|
| 91 |
-
if st.button("Use Sample Text"):
|
| 92 |
-
|
| 93 |
-
else:
|
| 94 |
-
|
|
|
|
| 95 |
|
| 96 |
button = st.button("Analyze")
|
| 97 |
|
|
|
|
| 79 |
20: 'optimism', 21: 'pride', 22: 'realization', 23: 'relief', 24: 'remorse', 25: 'sadness', 26: 'surprise',
|
| 80 |
27: 'neutral'}
|
| 81 |
|
| 82 |
+
st.write(" ")
|
| 83 |
+
st.write(" ")
|
| 84 |
st.write("Write or paste any number of document texts to analyse the emotion percentage with your document")
|
| 85 |
|
| 86 |
+
# # Define the sample text
|
| 87 |
+
# sample_text = ("Once, in a small village nestled in the rolling hills of Tuscany, lived an elderly woman named Isabella. "
|
| 88 |
+
# "She had spent her entire life in this village, raising her children and caring for her garden, which was the most "
|
| 89 |
+
# "beautiful in the region. Her husband, Marco, had passed away many years ago, leaving her with a heart full of memories "
|
| 90 |
+
# "and a small, quaint house that overlooked the lush vineyards.")
|
| 91 |
+
|
| 92 |
+
# # Add button to fill in sample text
|
| 93 |
+
# if st.button("Use Sample Text"):
|
| 94 |
+
# user_input = st.text_input(label="sample", value=sample_text, label_visibility="hidden")
|
| 95 |
+
# else:
|
| 96 |
+
|
| 97 |
+
user_input = st.text_area('Enter Text to Analyze')
|
| 98 |
|
| 99 |
button = st.button("Analyze")
|
| 100 |
|