Spaces:
Sleeping
Sleeping
# ***** Finacial Sentiment Analysis App ***** | |
# Team *** AI Supremo | |
# Author *** Lerato Chere | |
import streamlit as st | |
from transformers import pipeline | |
sentiment_pipeline = pipeline("sentiment-analysis") | |
st.title("Financial Sentiment Analysis \n Team AI Supremo ") | |
st.write("Enter a Financial Statement to Analyze the Sentiment:") | |
user_input = st.text_input("") | |
st.write("Press the Enter key") | |
if user_input: | |
result = sentiment_pipeline(user_input) | |
sentiment = result[0]["label"] | |
confidence = result[0]["score"] | |
st.write(f"Sentiment: {sentiment}") | |
st.write(f"Confidence: {confidence:.2%}") | |