Spaces:
Runtime error
Runtime error
eduardo-meik
commited on
Commit
·
98ec384
1
Parent(s):
25e1442
Update app.py
Browse files
app.py
CHANGED
@@ -6,6 +6,11 @@ st.title('Plataforma de Diálogos Participativos')
|
|
6 |
pipe = pipeline('sentiment-analysis')
|
7 |
text = st.text_area('Añade el texto a evaluar')
|
8 |
|
9 |
-
|
10 |
-
|
11 |
-
|
|
|
|
|
|
|
|
|
|
|
|
6 |
pipe = pipeline('sentiment-analysis')
|
7 |
text = st.text_area('Añade el texto a evaluar')
|
8 |
|
9 |
+
# Add a button for processing
|
10 |
+
if st.button('Evaluar Sentimiento'):
|
11 |
+
if text:
|
12 |
+
out = pipe(text)
|
13 |
+
st.json(out)
|
14 |
+
else:
|
15 |
+
st.warning("Por favor, añade un texto para evaluar.")
|
16 |
+
|