Spaces:
Sleeping
Sleeping
File size: 391 Bytes
3a229ca d214769 abb3529 3a229ca abb3529 3a229ca abb3529 3a229ca abb3529 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | import streamlit as st
from transformers import pipeline
sentiment_task = pipeline("sentiment-analysis")
st.title("Sentiment Analysis App")
userinput=st.text_area("Enter text for analysis")
if userinput:
result=sentiment_task(userinput)
st.write("Sentiment analysis result:")
st.write(f"label]:{ result[0]['label']}]")
st.write(f"confidence]:{ result[0]['score']:,4f}]")
|