import streamlit as st from transformers import pipeline # Streamlit application title st.title("Financial News Summarization & Sentiment Analysis") st.write("Summarize long financial news and identify the sentiment to help you make decisions.") # Load the summarization and sentiment analysis pipelines pipe = pipeline("text-classification", model="roselyu/FinSent-XLMR-FinNews") # User input user_input = st.text_area("Enter a financial news article:") # Summarize and identify sentiment button if st.button("Summarize and Identify Sentiment"): # Analyze sentiment sentiment_label = pipe(user_input)[0]["label"] # Display summary and sentiment st.write(f"Sentiment: {sentiment_label}")