Spaces:
Sleeping
Sleeping
| 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}]") | |