Streamlit_Test / app.py
Utsav2001's picture
Update app.py
530a04d verified
raw
history blame
368 Bytes
import streamlit as st
from transformers import pipeline
st.title("Sentiment Bot")
sentiment_pipeline = pipeline("sentiment-analysis", framework="pt")
user_input = st.text_area("Enter the Review")
if st.button("Analyze"):
result = sentiment_pipeline(user_input)
st.write("Sentiment:", result[0]['label'])
st.write("Confidence Score:", result[0]['score'])