Spaces:
Sleeping
Sleeping
Commit History
-
Update requirements.txt
d287f47 -
Update app.py
4d8210b -
Update app.py
5361c84 -
Update app.py
ebfafb8 -
Update app.py
00970c3 -
Create app.py
ec0c61d -
Delete app.py
import streamlit as st import pandas as pd import plotly.express as px from transformers import pipeline def main(): st.set_page_config(page_title="Sentiment Analysis App") st.sidebar.title("Sentiment Analysis App") st.sidebar.write("Choose a pre-trained model for sentiment analysis") model_name = st.sidebar.selectbox("Select Model", ["bert-base-uncased", "distilbert-base-uncased", "roberta-base"]) text_input = st.text_input("Enter text for sentiment analysis") if st.button("Analyze"): if text_input: sentiment_classifier = pipeline("sentiment-analysis", model=model_name) result = sentiment_classifier(text_input)[0] st.write(f"Sentiment: {result['label']}") st.write(f"Score: {round(result['score'], 4)}") # create a dataframe to hold the sentiment distribution df_sentiments = pd.DataFrame({"sentiment": ["Positive", "Negative", "Neutral"], "count": [0, 0, 0]}) …a1ab4c3 -
Update requirements.txt
127f666 -
Update requirements.txt
6e9016f -
Update app.py
180b28d -
Update app.py
103612d -
Update app.py
3f4d523 -
Create requirements.txt
4dad79d -
Create app.py
c710fd3 -
initial commit
62a701f