Spaces:
Runtime error
Runtime error
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.") | |