shikharyashmaurya's picture
Update app.py
dd65b52 verified
raw
history blame contribute delete
367 Bytes
import streamlit as st
st.title('Emotion Classification')
from transformers import pipeline
classifier = pipeline("text-classification")
input = st.text_input('Enter text here:', '')
if input:
outputs = classifier(input)
st.write('You entered:', input)
st.write('Emotion:', outputs[0]['label'])
st.write('Confidence in Emotion:', outputs[0]['score'])