import streamlit as st from transformers import pipeline st.title(" :smile: IMDB MOVIES SENTIMENT ANALYSIS") user_input = st.text_input("Enter your text:") classifier=pipeline("text-classification",model="flexnotop/imdb-v1",device=0) if st.button("Classify"): if user_input: result=classifier(user_input) if result[0]['label']=="LABEL_1": st.write("Positive Rating") else: st.write("Negative Rating") else: st.write("Please enter some text")