import streamlit as st from transformers import pipeline sentiment_pipeline = pipeline("sentiment-analysis") st.title("Sentiment Analysis with HuggingFace Spaces") st.write("this is a text") user_input = st.text_input("") otherinput = st.text_input("Enter text here") 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:.2f}")