sentiment / app.py
danielle2003's picture
require
0144081
raw
history blame
303 Bytes
import streamlit as st
from transformers import pipeline
# Load trained model
classifier = pipeline("text-classification", model="./models")
st.title("Sentiment Analysis with DistilBERT")
text = st.text_area("Enter a text")
if st.button("Predict"):
result = classifier(text)
st.write(result)