File size: 369 Bytes
af60de9 c51307f af60de9 c51307f af60de9 c51307f af60de9 c51307f |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
import streamlit as st
from transformers import pipeline
# Initialize the sentiment analysis pipeline
pipe = pipeline('sentiment-analysis')
# Create a text area in the Streamlit app for user input
text = st.text_area('Enter some Text')
# If the user has entered text, perform sentiment analysis and display the results
if text:
out = pipe(text)
st.json(out)
|