MaskFill / app.py
aemonshahbaz's picture
Update app.py
7f090f9 verified
import streamlit as st
from transformers import pipeline
# Load sentiment analysis model
analyzer = pipeline('sentiment-analysis')
# Streamlit UI
text = st.text_area('Enter some text for sentiment analysis:')
if text:
result = analyzer(text)[0]
st.write(f"**Label:** {result['label']} \n**Confidence:** {result['score']:.2f}")