File size: 399 Bytes
f359f97
6a243b1
 
25e1442
 
6a243b1
25e1442
6a243b1
98ec384
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import streamlit as st 
from transformers import pipeline

st.title('Plataforma de Diálogos Participativos')

pipe = pipeline('sentiment-analysis')
text = st.text_area('Añade el texto a evaluar')

# Add a button for processing
if st.button('Evaluar Sentimiento'):
    if text:
        out = pipe(text)
        st.json(out)
    else:
        st.warning("Por favor, añade un texto para evaluar.")